[Spread-users] Spread and select

Matthew Gillen mgillen at bbn.com
Fri Apr 7 19:21:02 EDT 2006

Hua Zhong wrote:
> It doesn't seem to be very difficult to do considering the mbox is actually a socket handle. I could certainly do a select on it
> myself, and hack SP_receive to do a non-blocking mode read. But I'd like to understand why it's not provided as a standard API.
> Thanks.
> Please let me know your opinion, thanks.

There's an example of using select() with the mbox fd in the event system
that is provided with Spread.  You don't have to hack SP_receive at all
(that's the whole point of using select()! ).  See the E_handle_events
function of events.c

It's really simple to use select() on your own.  I don't really see how
providing a wrapper for that would provide much benefit.


More information about the Spread-users mailing list