Skip to content

Simplify the implementation of new asynchronous exception semantics#19

Merged
mshinwell merged 3 commits intomshinwell:async-exns-only-breakfrom
stedolan:async-exns-only-break
Oct 11, 2022
Merged

Simplify the implementation of new asynchronous exception semantics#19
mshinwell merged 3 commits intomshinwell:async-exns-only-breakfrom
stedolan:async-exns-only-break

Conversation

@stedolan
Copy link
Copy Markdown

  • Use a flag in Caml_state to indicate whether an async exception is
    being raised, removing the need for two versions of caml_start_program

  • Use the same flag mechanism to distinguish async exceptions on both
    bytecode and native code

  • Check that only Break may be raised from async callbacks at the point
    of raising, rather than at the point of running the callback

  • No longer propagate Stack_overflow from async callbacks to the main
    program

  • Simplify raising logic by removing prepare_for_raise, as there is no
    longer a need to carefully avoid caml_raise recursion (Now, caml_raise
    may trigger callbacks, which may trigger caml_raise_async, which can
    trigger no further work)

  • Revert a change to setsigmask behaviour in interp.c

  • caml_raise_out_of_memory_fatal renamed to caml_fatal_out_of_memory,
    and is always a fatal error on both bytecode and native

  - Use a flag in Caml_state to indicate whether an async exception is
    being raised, removing the need for two versions of caml_start_program

  - Use the same flag mechanism to distinguish async exceptions on both
    bytecode and native code

  - Check that only Break may be raised from async callbacks at the point
    of *raising*, rather than at the point of running the callback

  - No longer propagate Stack_overflow from async callbacks to the main
    program

  - Simplify raising logic by removing prepare_for_raise, as there is no
    longer a need to carefully avoid caml_raise recursion (Now, caml_raise
    may trigger callbacks, which may trigger caml_raise_async, which can
    trigger no further work)

  - Revert a change to setsigmask behaviour in interp.c

  - caml_raise_out_of_memory_fatal renamed to caml_fatal_out_of_memory,
    and is always a fatal error on both bytecode and native
@stedolan stedolan requested a review from mshinwell as a code owner October 11, 2022 16:43
@mshinwell mshinwell merged commit 0efc844 into mshinwell:async-exns-only-break Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants