<br><br><div><span class="gmail_quote">On 19/11/2007, <b class="gmail_sendername">Ge Wang</b> &lt;<a href="mailto:ge@ccrma.stanford.edu">ge@ccrma.stanford.edu</a>&gt; 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.&nbsp;&nbsp;This has been fixed in CVS (unsporked shreds id default<br>to 0). </blockquote><div><br><br>&nbsp;One more thing, perhaps you already implemented this but in this code;
<br>----------------------------<br><br>Shred foo;<br><br>spork ~ test() @=&gt; foo;<br><br>second =&gt; now;<br><br>&lt;&lt;&lt;foo.id()&gt;&gt;&gt;;<br><br>foo.exit();<br><br>second =&gt; now;<br><br>&lt;&lt;&lt;foo.id()&gt;&gt;&gt;;
<br><br><br>fun void test()<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; while(1) second =&gt; now;<br>&nbsp;&nbsp;&nbsp; }<br>----------------------------<br><br>I&#39;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&#39;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>