Cancelling 'CallSubDelayed'

dimartinoentertainment

Member
Licensed User
Longtime User
Hi there

Is there a way to cancel 'running' subs when using CallSubDelayed?
I did some research but I couldn't find a solution for it.


Thanks in advance!
 

mc73

Well-Known Member
Licensed User
Longtime User
the first thing that comes in my mind is to declare a process global variable, name it 'okRun' and when wr need the sub to not run, we set this variable to true. inside the sub we check this variable and if true, we return without executing the remaining code. unfortunately this will not prevent the corresponding activity from starting up.
 
Upvote 0

dimartinoentertainment

Member
Licensed User
Longtime User
Why will you want to cancel the call? You should instead avoid calling it from the beginning.

I'm trying to achieve some type of threading with different activities. And because CallSubDelayed is a pretty useful and advanced function, I used it instead of creating it by myself. :)
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
I'm trying to achieve some type of threading with different activities. And because CallSubDelayed is a pretty useful and advanced function, I used it instead of creating it by myself. :)

You can even use this variable and check it inside the activity_create of the other activity. If 'true' finish the activity ;)
 
Upvote 0
Top