2008/4/28 Stefan Blixt <stefan.blixt@gmail.com>:
I don't know about the segv signal, but it seems to me that there is only one Bang instance that is shared by all iterations/shreds. This means that if two events arrive at this loop:
while( oe.nextMsg() ) {
oe.getInt() => b.value;
osctype => b.message;
b.broadcast();
}
the second's values will overwrite those of the first (value and message from the first event will be lost).
I think that's right and I think the way around this would be
while( oe.nextMsg() ) {
oe.getInt() => b.value;
osctype => b.message;
b.broadcast();
//yield to receiving shreds,
//then continue processing the message cue
me.yield();
}
This is the exact same principle I talked about earlier in this topic; if you don't yield you don't give the waiting shreds a chance to run. Advancing time here would probably not be a good idea.
Yours,
Kas.