Atte, A handy list of Shred functions (From our new Book, Appendix A :-): The ones you want are running() or done() Shred.fromId(int id) Returns shred object corresponding to id. int id(); Returns the ID number of the shred. void yield(); Causes the shred to temporarily discontinue processing and allows other active shreds to run. void exit(); Schedules the shred for immediate termination. int running(); Returns 1 if shred is still running, 0 otherwise. int done(); Returns 1 if shred has finished, 0 otherwise; except in rare cases, this is the opposite of done(). int args(); Returns the number of command-line arguments. string arg(int num); Returns command-line argument at position num. string me.dir(); Returns the directory from whence this shred came. string me.dir(int numUp); Returns numUp directories from whence this shred came; numUp can be positive or negative, with the same result.
On Mar 4, 2015, at 9:00 AM, chuck-users-request@lists.cs.princeton.edu wrote:
Message: 1 Date: Wed, 04 Mar 2015 12:51:11 +0100 From: Atte
To: ChucK Users Mailing List Subject: [chuck-users] is shred running? Message-ID: <54F6F1AF.6070209@youmail.dk> Content-Type: text/plain; charset=utf-8 Hi
I spork a file like this:
Machine.add(filename) => int id;
Is there a way to later on figure out if the shred is still running?
-- Atte
------------------------------
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
End of chuck-users Digest, Vol 116, Issue 1 *******************************************