@stefan, thanks for the hackery method =)<br><br>@kas, i thought i tried that, but i might have gotten confused at the "spork ~ my_fun() @=> my_shred;" line<br><br>the online documentation says "spork ~ my_fun() => Shred @ my_shred;" without declaring my_shred first, and this gives syntax errors.<br>
<br>I was trying to do the my_shred.exit(); thing, but was getting syntax errors. i didn't save what i was working on, so i can't post it, but i'll try it this way when i get a chance.<br><br>thanks<br>-k<br><br>
<div class="gmail_quote">On Mon, Mar 17, 2008 at 4:02 AM, Kassen <<a href="mailto:signal.automatique@gmail.com">signal.automatique@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div><div class="Ih2E3d"><span class="gmail_quote">On 17/03/2008, <b class="gmail_sendername">Stefan Blixt</b> <<a href="mailto:stefan.blixt@gmail.com" target="_blank">stefan.blixt@gmail.com</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;">
Doesn't this effectively happen if the method executing in the shred exits? LIke this:</blockquote></div><div><br><br>Yes, it does, and that's one way. Another is to use the "Machine" device. For example "Machine.remove(15);" will remove the shred with id 15 (see chuck --status for id numbers). Note that that spork operations will return the id of the new shred as a int.<br>
<br>Also possible;<br>--------------------------------------------------<br>//create a shred reference with a name<br>Shred my_shred;<br><br>//assign a bit of running code to it<br>spork ~ my_fun() @=> my_shred;<br><br>
//other stuff happens<br>5::minute => now;<br><br>//this is really quite readable compared to other options.<br>my_shred.exit();<br></div>-----------------------------------------<br><br>Hope that helps,<br>Kas.<br></div>
<br>_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br></blockquote></div><br>