[Spread-users] Spread with non-blocking I/O

Martin Waite martin at datacash.com
Mon Dec 1 05:13:11 EST 2003


Is it safe to use Spread with non-blocking I/O ?

I would like to write a select()- or poll()-based 
network listener that collects requests from the 
network and forwards them to request handlers 
via Spread.

I understand that the Spread mailbox is a file-handle
and so select() should tell me when data is available 
for reading/writing.  However, does the availability 
of data on the file handle guarantee that the call 
to sp_receive() will not block ?

Can I use the Spread Event subsystem to handle 
non-blocking I/O and give this control over my listening 
socket and accepted connections ?

Martin Waite

More information about the Spread-users mailing list