[Lazarus] How does one add an event to a blocking system?
Sven Barth
pascaldragon at googlemail.com
Wed Oct 21 17:27:41 CEST 2015
Am 21.10.2015 14:59 schrieb "Michael Schnell" <mschnell at lumino.de>:
> CheckSynchronize() needs to be called by the main thread (in fact a
threat becomes the main thread _because_ it calls CheckSynchronize().
The part in parenthesis is wrong. CheckSynchronize checks for MainThreadID
which is determined independently of CheckSynchronize.
> The Events thrown by other Threads via TThread.Synchronize and
TThread.Queue are executed as sub-procedures of CheckSynchronize() and
hence they are executed in the main thread and they are executed in the
order they have been queued by other threads.
Better usage of terms: Exceptions are thrown (or raised), events are
signaled.
> AFAIR if an Event is in the queue same is executed and
CheckSynchronize(I) returns without checking if more Events are queued.
CheckSynchronize completely cwalks the lost before it returns.
> AFAIK the return parameter of CheckSynchronize() does not give any decent
result and needs to be ignored.
That is indeed always "false" right now. I should check sometime what it is
supposed to return... Probably whether at least one event got executed :/
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20151021/2046dba6/attachment-0003.html>
More information about the Lazarus
mailing list