On 08/21/2013 02:36 PM, Mark Morgan Lloyd wrote:
I know it's the obvious way, but surely there is something more elegant than having a thread which exists solely to transfer the result of a select() to the main part of the app, and then repeats

I suppose a thread is the only way to do this in a portable way.

The cost of a thread is close to zero. It just blocks in the requests and does a single turn for any change.

-Michael

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to