[fpc-pascal] PostMessage() from a thread (in a thread save manner)
dmitry boyarintsev
skalogryz.lists at gmail.com
Mon Oct 20 17:10:01 CEST 2008
Your code is safe for multiple threads to post to the queue.
But you also must make sure, that Processing a messsage from queue, would
not break Posting safetiness. The easiest way, is to wrap message extraction
into the same fpgApplication.Lock
You must also make sure, that no thread can try to post message, after
fpgApplicaiton is released. And it's quite possible situation, that causes
"strange errors" on application finalization.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20081020/d3f0210d/attachment.html>
More information about the fpc-pascal
mailing list