<div dir="ltr">Hi Atte,<div><br></div><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 5, 2015 at 2:36 AM, Atte <span dir="ltr">&lt;<a href="mailto:atte@youmail.dk" target="_blank">atte@youmail.dk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>On 03/04/2015 06:59 PM, Perry Cook wrote:<br>
&gt; Atte,<br>
&gt;<br>
&gt; A handy list of Shred functions (From our new Book, Appendix A :-):<br>
<br>
</span>And where do I find this info online?<br></blockquote><div><br></div><div>Theyre probably in a changelog somewhere, but also I am working on a new documentation system (generated from ChucK source) which automatically picks up new features like this. There is a prerelease version here: </div><div><a href="https://ccrma.stanford.edu/~spencer/ckdoc/" target="_blank">https://ccrma.stanford.edu/~spencer/ckdoc/</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span><br>
&gt; The ones you want are running() or done()<br>
<br>
</span>Hmmm. Thought I could do<br>
<br>
return(Shred.fromId(myID).running())<br>
<br>
but that gives null pointer exception. Makes sense, the shred with the<br>
id is not running, so I get a null reference, and trying to call<br>
running() on that... Better is<br>
<br>
return(Shred.fromId(myID)!=null)<br>
<br>
However something strange happens in combination with<br>
Machine.remove(myID) that doesn&#39;t happen when I switch to<br>
Shred.fromId(myID).exit(). The scenario is quite complex, so for now a<br>
quick difference of the two ways to remove a shred would be nice...<span><br></span></blockquote><div><br></div><div>Hmm, it would be nice if there was no difference. But there is a difference, internally, and it appears that is leaking out of the abstraction so to speak. So basically .exit() appears to terminate the shred immediately whereas Machine.remove() waits until all shreds have finished executing for this sample, i.e. all shreds are waiting =&gt; now. At least that is what I am interpreting from the source code. </div><div><br></div><div>spencer</div><div><br></div><div><br></div><div> <span>
--<br>
Atte<br>
<br>
<a href="http://atte.dk" target="_blank">http://atte.dk</a>   <a href="http://a773.dk" target="_blank">http://a773.dk</a><br>
</span><div><div>_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">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>
<br>
</div></div></div></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="font-family:arial;font-size:small"><div>Spencer Salazar<br></div><div>Doctoral Candidate</div><div>Center for Computer Research in Music and Acoustics</div><div>Stanford University</div><div><br></div><div><a href="mailto:spencer@ccrma.stanford.edu" target="_blank">spencer@ccrma.stanford.edu</a></div><div></div><div><a href="tel:%2B1%20831.277.4654" value="+18312774654" target="_blank">+1 831.277.4654</a><br></div><div><a href="https://ccrma.stanford.edu/~spencer/" style="color:rgb(17,85,204)" target="_blank">https://ccrma.stanford.edu/~spencer/</a><br></div><div><br></div></div></div></div></div></div></div></div></div></div>
</div></div>