On Mon, Sep 25, 2017 at 6:06 PM, Steven Costiou <steven.cost...@kloum.io> wrote:
> Hi, > > how can i know if a given method is being executed ? > > For ex.: > > process := [[mycondition] whileTrue:[ myObject doStuff. myDelay wait]] fork > > I want to suspend process and find if doStuff is being executed or if > process is waiting. > I'm not sure if your wanting something more built in, or just "some way", so for the latter, consider wrapping in with your own status flags... status := #setup. watcher := [[true] whileTrue:[ Transcript crShow: status. 900 milliSeconds wait] ] forkAt:36. result := 0. worker := [[true] whileTrue:[ status := #WORKING. 1 second wait. result := result + 1. Transcript crShow: result. status:=#waiting. 3 seconds wait] ] forkAt:35. worker suspend. worker resume. cheers -ben