<div dir="ltr">Hello,<br><div><br>Current use of Timeout parameter in TSimpleIPCServer.PeekMessage:<br><br>* >0 -- number of milliseconds to wait.<br>* 0 -- not documented and inconsistent!<br>  * Windows -- wait infinitely (forced via MsgWaitForMultipleObjects)<br>  * Unix -- return immediately (implicit via fpSelect)<br>  * OS/2 -- return immediately (implicit via DosWaitEventSem)<br>  * Amiga -- wait 25 ms (forced via Sleep)<br>* -1 -- not documented, but consistent!<br>  * Windows -- wait infinitely (implicit via MsgWaitForMultipleObjects)<br>  * Unix -- wait infinitely (implicit via fpSelect)<br>  * OS/2 -- wait infinitely (implicit via DosWaitEventSem)<br>  * Amiga -- wait for MaxInt ms (implicit via Sleep)<br>* <-1 -- not documented and inconsistent!<br><br>The biggest problem is that it is impossible to get PeekMessage to return immediately in Windows, making SimpleIPC unusable in GUI thread (or other high performance threads).<br><br>I propose the following consistent use of Timeout parameter:<br><br>* >0 -- number of milliseconds to wait.<br>* 0 -- return immediately.<br>* -1 -- wait infinitely.<br>* <-1 -- wait infinitely (force to -1).<br><br>I can produce a patch and a test project, if there are no objections.<br><br></div><div>Regards,<br></div><div>Denis Kozlov<br></div></div>