Project

General

Profile

Bug #14945 ยป 0001-thread.c-blocking_region_end-clear-ubf-before-unregi.patch

normalperson (Eric Wong), 07/28/2018 12:45 AM

View differences:

thread.c
static inline void
blocking_region_end(rb_thread_t *th, struct rb_blocking_region_buffer *region)
{
/* entry to ubf_list still permitted at this point, make it impossible: */
unblock_function_clear(th);
/* entry to ubf_list impossible at this point, so unregister is safe: */
unregister_ubf_list(th);
gvl_acquire(th->vm, th);
rb_thread_set_current(th);
thread_debug("leave blocking region (%p)\n", (void *)th);
unregister_ubf_list(th);
th->blocking_region_buffer = 0;
unblock_function_clear(th);
if (th->status == THREAD_STOPPED) {
th->status = region->prev_status;
}
-
    (1-1/1)