[fpc-pascal] Best way to check SimpleIPC for messages

Michael Schnell mschnell at lumino.de
Tue May 16 11:55:20 CEST 2017


On 16.05.2017 07:30, Michael Van Canneyt wrote:
>
> select is basically what peekmessage does.
>
AFAIK "select()" (and - more versatile -  "<e>poll()"  ) in Linux uses 
an appropriate system call to wait on one of multiple events (i.e. 
devices, including e.g. pipes, which might be used by IPC). (Despite the 
name) it does not do any "busy wait" ("polling"). So it's can be used 
(instead of waiting in a blocking read)  in a worker-thread of an 
"application". It's perfectly useful in an program without a message 
queue provided by LCL or the mse-library.

-Michael



More information about the fpc-pascal mailing list