<div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace"><span style="font-family:arial">2014-09-15 17:23 GMT+08:00 Michael Schnell </span><span dir="ltr" style="font-family:arial"><<a href="mailto:mschnell@lumino.de" target="_blank">mschnell@lumino.de</a>></span><span style="font-family:arial">:</span><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<br>
In that case I definitely would use Application.QueuAsyncCall.</div></blockquote><div><br></div><div class="gmail_default" style="font-family:'courier new',monospace">If I understand correct, from this page:</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style><font face="courier new, monospace"><a href="http://wiki.freepascal.org/Asynchronous_Calls">http://wiki.freepascal.org/Asynchronous_Calls</a></font><br></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">QueueAsyncCall is, like what its name suggest, doing this in asynchronous favor -- it execute queued method in the next message loop (while Application.ProcessMessages takes place, right?).</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">But what I need PostMessage for is to notify main thread (or another thread) that a worker thread finished its job, so that the thread manager can start a new thread to do the remaining work.</font></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">Anyway, is PostMessage considered "deprecated" or "shall be used on windows only"? Is there a better way to do what I want?</font></div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">Thanks,</div><div class="gmail_default" style="font-family:'courier new',monospace">Xiangrong</div></div></div></div>