[chuck-users] osc listener shred woes

Kassen signal.automatique at gmail.com
Mon Apr 28 12:19:38 EDT 2008


2008/4/28 Stefan Blixt <stefan.blixt at gmail.com>:

> Yeah, but note that there are two shreds running this loop in parallell.
> So if one event on each port arrive at the same time, chances are that the
> first yield will hand over execution to the second shred, that in turn
> overwrites b.value and b.message.


Ow, right, yes, oops, that would be a issue indeed because the OSC event
will be higher on the "list of things to wait for" (I still think we should
yield there, BTW, as that's at least one part of the issue).

Erm..... that makes it quite hard indeed. I was thinking about a
"has_been_parsed" flag in the event that's set to "1" at sending it and "0"
when receiving it, then have the OSC shreds yield while this is true but
they'd probably keep yiedling to eachother and maybe even get the VM stuck.
I'm not a 100% sure there, I don't think the way that part of the concurency
works is documented at all.

That could really stand some documenting.
Erm.... Ge?

Yours,
Kas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20080428/8fbafd88/attachment.htm>


More information about the chuck-users mailing list