Author Topic: Threads  (Read 1373 times)

JamesBrown

  • Newbie
  • *
  • Posts: 8
    • View Profile
Threads
« on: March 01, 2010, 05:11:54 pm »
It appears that the USB Pipes are operating with a different thread than the Main application.  The USBPipePair2AfterReceive event has problems setting main application variables.

Does anyone know how to interface these events with the main application?  Does it need a synchronize procedure?  How

Delphi 7

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Threads
« Reply #1 on: March 01, 2010, 06:02:56 pm »
Hello

Yes, of course, the input data is monitoring in separated thread.

I hope We will add UseMainThread mode into TnrUsbPipePair as it had done in TnrComm (serial port component) asap.

Whilst You can use other well known ways for multithreaded synchronization (CriticalSections, Event objects, SendMessage() etc.)

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.