On 10/31/2015 01:07 PM, Bo Berglund wrote:
I had hoped that while executing sleep() statements the main thread would yield to the TCP thread but it seems like it does not...
Sleep() indeed puts the running (main) thread to sleep and allows for other threads to run in the mean time.

The problem with sleep is not that it would not work as expected, but that it increases the latency. It your Thread fires main thread events (that later are called by "CheckSynchronize()"), with sleep they are not executed immediately (as one would desire) but only with a latency of (up to) the sleeping time.

-Michael


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to