summaryrefslogtreecommitdiff
path: root/version.h
diff options
context:
space:
mode:
authornicholas a. evans <nicholas.evans@gmail.com>2021-02-21 16:33:11 -0500
committerGitHub <noreply@github.com>2021-02-22 10:33:11 +1300
commit3ee4fa9491d0b2b5fb40deea8e93e797924de789 (patch)
tree8bc76a96a94e995d8c786870041bad2b0f0cdbec /version.h
parentaeac4ddcc0de536c0ecdea29e01dd2505e32f6ae (diff)
Send :fiber_switch event for almost every fiber_switch (#4207)
With this patch, TracePoint receives a `:fiber_switch` event for _almost_ every fiber switch. Previously, it would not be sent when an exception was going to be raised. Now the event should only be blockable by an interrupt (including `Thread#raise`) or a fatal error. Additionally, interrupts will now be checked on the return fiber _before_ re-raising the terminating unhandled exception. And a fiber that terminates with an unhandled exception no longer creates a pending interrupt on its thread. The exception will be raised in the return fiber the same way as `Fiber#raise`: using `cont.value` with `cont.argc == -1` I moved `rb_exc_raise` from `fiber_store` to the end of `fiber_switch` after _all_ of the other cleanup code: `fiber_stack_release`, `th->blocking` increment, `RUBY_VM_CHECK_INTS`, and `EXEC_EVENT_HOOK`. It seems to me that skipping those other cleanup steps may have also resulted in other bugs.
Notes
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
Diffstat (limited to 'version.h')
0 files changed, 0 insertions, 0 deletions