[Spread-users] Concurrency issues with spread 4

Johannes Wienke jwienke at techfak.uni-bielefeld.de
Wed Sep 22 11:49:50 EDT 2010

Dear all,

I'm currently struggling with some issues probably related to
concurrency and would be glad to get some insight.

We're having one concurrently operating thread that constantly receives
messages on an mbox and processes them. From other threads than the
receiving, the memberships and lifecycle of the mbox are controlled.

Now I noticed a problem with the following sequence:

1. [receiver thread] blocks in SP_receive
2. [other thread] joins mbox of receiving thread to a group
3. [other thread] directly after the join call sends a message to this group

Now the receiving thread does not receive the message sent by the other
thread. If I add a short sleep between 2. and 3., the receiver thread
gets the message.

So, is there no guarantee that a concurrently operating receiver thread
receives every message directly sent after a join call from another
thread? Or what is the reason for this behavior?

A second problem I encountered is how to interrupt the blocking call to
SP_receive. Currently we're trying to interrupt SP_receive by
disconnecting the mbox from another thread. Unfortunately this does not
work in some cases and SP_receive endlessly hangs on the mbox. So again,
is there no guarantee that SP_receive exits with an error if the
underlying mbox is closed?

Thanks in advance for your help,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.spread.org/pipermail/spread-users/attachments/20100922/864dc1ba/attachment.bin 

More information about the Spread-users mailing list