diff options
author | Koichi Sasada <ko1@atdot.net> | 2019-07-15 13:52:25 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2019-07-15 14:29:47 +0900 |
commit | 3dc212896c422add43c850ee1d1a613c7cc96737 (patch) | |
tree | 487e1ad85c9d4ae5ce77af43f9d50e8713af8046 /thread.c | |
parent | e4c1b199961cc5fa34c02b2225bbc14b75259fd2 (diff) |
check return value of blocking_region_begin().
blocking_region_begin() can return FALSE if it fails to acquire
GVL, so check it.
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1679,7 +1679,8 @@ rb_thread_call_with_gvl(void *(*func)(void *), void *data1) /* enter to Ruby world: You can access Ruby values, methods and so on. */ r = (*func)(data1); /* leave from Ruby world: You can not access Ruby values, etc. */ - blocking_region_begin(th, brb, prev_unblock.func, prev_unblock.arg, FALSE); + int released = blocking_region_begin(th, brb, prev_unblock.func, prev_unblock.arg, FALSE); + RUBY_ASSERT_ALWAYS(released); return r; } |