From: ko1@... Date: 2017-04-26T23:17:52+00:00 Subject: [ruby-core:80892] [Ruby trunk Misc#13514] [PATCH] thread_pthread.c (native_sleep): preserve old unblock function Issue #13514 has been updated by ko1 (Koichi Sasada). Do you expect such situation? (1) run ruby code # acquiring GVL (2) run func on without_gvl() # releasing GVL (3) run func on with_gvl() # re-acquire GVL (4) run func on without_gvl() # releasing GVL <- here I agree. It has a problem. But we should save UBF at `with_gvl()` function, I assume. And checking `thread.c`, it is saved. What situation do you assume? ---------------------------------------- Misc #13514: [PATCH] thread_pthread.c (native_sleep): preserve old unblock function https://bugs.ruby-lang.org/issues/13514#change-64498 * Author: normalperson (Eric Wong) * Status: Open * Priority: Normal * Assignee: ---------------------------------------- Do not blindly clobber UBF if one exists, emulating the behavior of the set_unblock_function and reset_unblock_function pair. I think the native_sleep implementation in thread_win32.c, can use a similar change; but I do not run non-Free software so I cannot test. I'm pretty sure this is correct, and will commit in a few days. On the other hand, I'm not sure if anybody is affected by this. If it's OK, somebody should also update thread_win32.c since I'm not comfortable doing so without being able to test. ---Files-------------------------------- 0001-thread_pthread.c-native_sleep-preserve-old-unblock-f.patch (1.21 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: