[Lazarus] lnet component
Michael Schnell
mschnell at lumino.de
Wed Sep 5 14:19:28 CEST 2012
On 09/05/2012 10:01 AM, Antonio Fortuny wrote:
> . The problrm is this is a heavy piece of code and tests are not easy.
Not necessarily.
While the most efficient way indeed is to handle the communication
greatly in the thread, your Thread also can just push the bytes in a
TThreadList or something similar, and signal the MainThread by
QueuAsyncCall().
Now the complex stuff can be handled (and debugged) in the MainThread,
without the necessity to take care of mutual data access (such as
necessary when accessing variables as well from the Thread as from the
MainThread.
-Michael
More information about the Lazarus
mailing list