[Spread-users] Allowing for non-block reads/write in spread

John Schultz jschultz at spreadconcepts.com
Fri Jun 15 16:06:45 EDT 2007

You are correct that Spread's current interface can cause blocking as it 
doesn't allow for partial reads or writes.  We have thought about how to 
improve the interface to better support true non-blocking I/O and may 
revisit this issue sometime in the future.

Regardless, you can currently use the mailbox in an event loop as it is a 
file descriptor.  If your client's connection is to a local daemon the 
likelihood of your app. actually blocking is extremely low.


John Schultz
Spread Concepts
Phn: 443 838 2200

On Fri, 15 Jun 2007, Mike Simon wrote:

> I just started using spread and in looking at the source a little bit I think 
> an improvement can be made to the API.  The API as is can potentially block 
> when reading/writing with SP_mutlicast and SP_recv. It would be nice if there 
> were non-blocking versions of these API's so that it could be safely 
> integrated with an existing event loop (i.e. homegrown select,poll,kqueue, 
> ACE,libevent etc.).  As long as the user was notified that a partial 
> read/write had occurred they could call the libspread API again with an 
> offset to get/send the balance.
> Any thoughts out there?
> -- 
> Mike Simon
> SJ2 Technologies LLC
> (630) 682-0198 (w)
> (312) 545-8158 (c)
> (866) 789-9761 (f)
> _______________________________________________
> Spread-users mailing list
> Spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users

More information about the Spread-users mailing list