[chuck-users] is shred running? (Atte)

Atte atte at youmail.dk
Thu Mar 5 05:36:35 EST 2015


On 03/04/2015 06:59 PM, Perry Cook wrote:
> Atte,
> 
> A handy list of Shred functions (From our new Book, Appendix A :-):

And where do I find this info online?

> The ones you want are running() or done()

Hmmm. Thought I could do

return(Shred.fromId(myID).running())

but that gives null pointer exception. Makes sense, the shred with the
id is not running, so I get a null reference, and trying to call
running() on that... Better is

return(Shred.fromId(myID)!=null)

However something strange happens in combination with
Machine.remove(myID) that doesn't happen when I switch to
Shred.fromId(myID).exit(). The scenario is quite complex, so for now a
quick difference of the two ways to remove a shred would be nice...

-- 
Atte

http://atte.dk   http://a773.dk


More information about the chuck-users mailing list