Get running process and pending
Posted: Wed Nov 28, 2012 3:39 am
Hi all,
If I use a 'Send "myHandler" in n seconds' which will write some info to a socket but at the same time that it runs (in the n amount of seconds) I have another handler that will need to write to that socket too, is there some way that my second handler can tell if the other is running?
I can tell if it is in the queue to run and I suppose that if it's not in the PendingMessages list then it must be running (or has finished running perhaps). The executionContexts is useful for finding out the current handler and line number but I cant seem to get it to list more than one item, only the one that the 'get the executionContexts' line is actually in.
So, what i'm really asking is Can I Get a List of the Currently Running Handlers? Or is there only EVER the one handler running and the others are held in a queue in the pendingMessages list?
Many thanks
Pi
If I use a 'Send "myHandler" in n seconds' which will write some info to a socket but at the same time that it runs (in the n amount of seconds) I have another handler that will need to write to that socket too, is there some way that my second handler can tell if the other is running?
I can tell if it is in the queue to run and I suppose that if it's not in the PendingMessages list then it must be running (or has finished running perhaps). The executionContexts is useful for finding out the current handler and line number but I cant seem to get it to list more than one item, only the one that the 'get the executionContexts' line is actually in.
So, what i'm really asking is Can I Get a List of the Currently Running Handlers? Or is there only EVER the one handler running and the others are held in a queue in the pendingMessages list?
Many thanks
Pi