"Stop other scripts" bug addressed?

Wow, I don't remember any such thing in a library. The only "try" thing is the "safely try" for catching errors.

Just noticed a commit in dev version by Jens that might have addressed the original issue

Yup, I think so.

Don't you think this should be a library or something? Iv'e needed something like this several times.

Maybe, I'll consider it.

Nice!

It can't use STOP OTHER SCRIPTS though, because there may be other scripts running besides the one you want to time-limit. To do it right we might have to invent a STOP SCRIPT ___ that takes one particular script as input somehow.

The block I made tells a clone to tell the parent to run a script. So shouldn't a launched script keep running afterward? maybe a list could be helpful? Just throwing out ideas.

Here is what I have: Snap! 6.9.2 Build Your Own Blocks

It's funny that I made a project, a few months ago, to experiment with explicit process control.
You can create&lookup the named process.
processManager script pic (15)
processManager script pic (16)
You can get the ID of the newly created process.
processManager script pic (18)
ID of the current process.
processManager script pic (17)
And fine-control the processes with
processManager script pic (19)

Timed'out reporter can be created processManager script pic (21)
processManager script pic (22)

There is also a "patch" (the "ThreadManager" sprite) to the potential "problem" described here "Launch" & yield lifecycle problem.

What does the javascript do?

Reduces the delay
processManager script pic (23)
to < 8ms

OK, Thanks for your explanation. :slight_smile:

Wow that's way more than we need! Although in principle I like the idea of first class processes, Jens would never do it this way. :~)

This can be quite easily implemented in plain :snap: with clones as a threads. But...
Given for the Black sprite
untitled script pic - 2021-11-25T032333.168
This script moves Black sprite untitled script pic - 2021-11-25T032641.880
while this, the Red one untitled script pic - 2021-11-25T032527.690
Test project

That's weird. I have to think about whether or not it's a misfeature. :~)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.