Le 05/09/2012 14:19, Michael Schnell a écrit :
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.
Yes, maybe. But as I'm known to be a paranoïd guy when tests and
controls are concerned, it is a big piece of code actually, trust me.
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().
Maybe the most elegant solution. I'll test it for the new release.
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
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus