It was some library that had a block that would give up if it took to long...
No it was like [scratchblocks] (try reporting  for () seconds::control)[/scratchblocks] or something like that.
Wow, I don't remember any such thing in a library. The only "try" thing is the "safely try" for catching errors.
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.
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.
You can get the ID of the newly created process.
ID of the current process.
And fine-control the processes with
Timed'out reporter can be created
There is also a "patch" (the "ThreadManager" sprite) to the potential "problem" described here "Launch" & yield lifecycle problem.
Reduces the delay
to < 8ms
OK, Thanks for your explanation.
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 with clones as a threads. But...
Given for the Black sprite
This script moves Black sprite
while this, the Red one
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.