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
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus