[Spread-users] Question about thread-safety

Joshua Goodall joshua at roughtrade.net
Mon Jun 16 19:47:17 EDT 2003


On Fri, Jun 13, 2003 at 02:31:05PM -0400, John Schultz wrote:
> The only way I can think of to avoid this race condition with the 
> current Spread library is to instruct your OS not to reuse file 
> descriptors IDs (see NOTE above).

I can't think of a way to achieve that. 

As a band-aid, you could change the mailbox parameter to be an index
into a lookup table.  You'd need a smaller wrapper for the lookup
and another for SP_connect.  Assuming you can manage the table size
effectively, you can achieve a monotonically increasing "mbox" value
without modification of the application.

Joshua.




More information about the Spread-users mailing list