Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a synchronous ThreadLocalAction for killing other threads
* That way we have a snapshot fo the currently-running fibers and avoid e.g. scheduling the action on 2 Fibers of the same thread. See the javadoc of Env#submitThreadLocal which say: > Already started synchronous actions will block on activation of a new thread. * Also this means we don't throw the KillException until all currently-running fibers have reached the safepoint. * Note that because of the throw this synchronous action will be exited quickly by all threads once all threads have reached the safepoint. So there is no concern about a nested safepoint or new threads staying blocked a long time. * This was the only ThreadLocalAction which affects multiple Ruby Threads and was asynchronous. (cherry picked from commit 3637300)
- Loading branch information