You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Do not slow down allocations when an asynchronous callback cannot be
handled immediately.
- Do not wait that other threads have processed signals not for us in
[caml_enter_blocking_section].
Before this commit, if a pending action cannot be processed
immediately then all the allocations go through the slow path until it
is processed. It is also possible that we are looping at the start of
blocking sections because a signal is pending but not for us.
This commit introduces a simpler design whereby [action_pending] alone
is used to remember that an asynchronous callback should be run, and
[young_limit] is only used to interrupt running code. The key is to
modify going from C to OCaml code so that [young_limit] is set
appropriately according to [action_pending]. This avoids situations
where we have to repeatedly increase [young_limit] immediately despite
the corresponding action not being processed.
The intuition is that OCaml behaves as if asynchronous actions are
"masked" inside C code (where an "unmasking" action is responsible for
setting [young_limit] according to [action_pending] when the mask
ends).
0 commit comments