[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] inf.do { }



I think we should figure out what we need to do to the language to allow command-. to break out of

inf.do { }

etc.

any mistake with recursion, stupidity etc. causes me to have to force quit (if I catch it in time before it takes down the whole computer).

we probably need to add something in the lang that stops every 10,000 byte codes to check for a flag that command-. can set.

When you execute a selection the VM is called from the run-loop. The cmd-period isn't received if the VM is blocking.

It would be pretty easy and side-effect free to have the selection execute from a separate thread. This would allow the cmd-period to be received. The problem is stopping the VM, deciding when stopping is acceptable, etc. Really it isn't acceptable anywhere because it will leave things in an indeterminate state...if code can be terminated anywhere then things can happen that you can't possibly plan for.

However, if interpretCmdLine ran from a separate thread then you could recompile without an issue, which would stop any run-away threads/ routines of course.

Ryan