The discussion:

http://forum.dlang.org/thread/mailman.426.1286264462.858.digitalmar...@puremagic.com?page=9

implies that:
   receiveTimeout(dur!"msecs"(0), some-callback-function)

is acceptable - meaning that no blocking occurs. A simple experiment verifies this - but I hesitate to use "undocumented" features. Some APIs would interpret the 0 as infinity.

I also fear that placing such a nonblocking recieve into the main event loop of a GUI program would impact performance - it would also be non-generic. Is there a fast function which returns true just when the "mail box" is non-empty?

Thanks

Reply via email to