2008/4/28 Stefan Blixt <<a href="mailto:stefan.blixt@gmail.com">stefan.blixt@gmail.com</a>>:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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:<div class="Ih2E3d"><br><br> while( oe.nextMsg() ) {<br>
oe.getInt() => b.value;<br>
osctype => b.message;<br>
b.broadcast();<br>
}<br><br></div>the second's values will overwrite those of the first (value and message from the first event will be lost).</blockquote></div><br>I think that's right and I think the way around this would be<br>
<br> while( oe.nextMsg() ) {<br>
oe.getInt() => b.value;<br>
osctype => b.message;<br>
b.broadcast();<br> //yield to receiving shreds,<br> //then continue processing the message cue<br> me.yield();<br>
}<br><br>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.<br>
<br>Yours,<br>Kas.<br>