<br><br><div><span class="gmail_quote">On 19/11/2007, <b class="gmail_sendername">Ge Wang</b> <<a href="mailto:ge@ccrma.stanford.edu">ge@ccrma.stanford.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This is bug, where the internal ID is uninitialized for user instantiated<br>Shred instances. This has been fixed in CVS (unsporked shreds id default<br>to 0). </blockquote><div><br><br> One more thing, perhaps you already implemented this but in this code;
<br>----------------------------<br><br>Shred foo;<br><br>spork ~ test() @=> foo;<br><br>second => now;<br><br><<<foo.id()>>>;<br><br>foo.exit();<br><br>second => now;<br><br><<<foo.id()>>>;
<br><br><br>fun void test()<br> {<br> while(1) second => now;<br> }<br>----------------------------<br><br>I'd like the second call for <a href="http://foo.id">foo.id</a> to return 0. This is useful if test() is a function that performs a specific task, then exits and we'd like to know if it already did so. IMHO (but perhaps others have better suggestions) this would be cleaner then defining a extra variable for this (especially as we may not know how many we need) and if 0 is the id for non-existant shreds this would also save making a .ifExists() (or similar) call.
<br><br>Perhaps there are unforeseen downsides to this?<br></div><br><br>Keep on sporking,<br>Kas.<br></div>