On 25 Sep 2017, at 12:06, Steven Costiou <steven.costiou@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.

How could i do that ?]


you could iterate all processes, there then get the stack and look up the sender chain
if the method is somewhere to be found. If yes -> it is exectuted right now.

One problem is that which methods are on the stack changes, so you should
try to avoid process switches while doing the analysis.

Marcus