<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br><div>> > Synchronize submits a procedure for execution by the main thread, and waits till the main thread has processed it.<br>
><br>
> Ok, i understand that, but if that procedure is dummy, i do understand why it takes a delay. <BR>
The Synchronize code can not know that the method you passed is an empty one, so it's handled like every other method. And even if the compiler could know that it is an empty one it could not judge what Synchronize is doing with it (especially since Synchronize and the execution code in CheckSynchronize is very loosely coupled). Also it is consistent that an empty method is handled the same as a non-empty one.<BR>

And again: the delay until Synchronize returns is not only dependant on the runtime of the method, but also on the frequency in which the main thread calls CheckSynchronize in which the method will finally be executed.<BR>

Regards,<br>
Sven<BR>
________________________________________________________________<br><br>Yep, Sven, that is a clear explanation.<br>Now, ok, i catch it.<br>Many thanks. ( and i gonna finally sleep good this night ). ;)<br><br>PS : Im a totally FPC-addicted and i like that ;).<br><br></div>                                           </div></body>
</html>