Closed julik closed 6 years ago
@marshall-lee since you stumbled upon this anyway - have you got an idea what I should use instead of rb_thread_call_with_gvl
when we only have rb_thread_blocking_region
available (for pre-2.2 Rubies). I've been looking around but it seems all the docs online now only mention rb_thread_blocking_region
being removed.
@toland ?
LGTM.
We should provide some ability for users to re-acquire the GIL and call Ruby callback blocks. We will start with a progress callback which can be used for progress bars and speed computation. We also need to alter the way we unblock the thread so that we correctly handle signals.
This adds the following API:
The GIL will only be reacquired if this is configured on the Session/Request objects, otherwise we proceed through the same fast path as before with the GIL unlocked.
Closes #150 and paves the way for making #139 possible