-
Notifications
You must be signed in to change notification settings - Fork 0
STOP is not cooperative. #87
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
According to the specification section 9.1.9:
THR: STOP(THR: thread)= MUST cooperatively stopthread, mark it finished, and return the resulting handle.
In the implementation, however, STOP only marks the handle as finished. The worker keeps running, so a supposedly stopped thread can still continue executing, and AWAIT can block indefinitely on it.
Prefix REPL. Enter statements, blank line to run buffer.
>>> THR(t){ WHILE(0d1){} }
>>> STOP(t)
>>> AWAIT(t)
AWAIT does not return here, as the worker was never actually stopped.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working