From: kosaki.motohiro@... Date: 2015-10-26T21:27:03+00:00 Subject: [ruby-core:71197] [Ruby trunk - Feature #11607] [PATCH] fiddle: release GVL for ffi_call Issue #11607 has been updated by Motohiro KOSAKI. Nevermind. I did misinterpret your code. I'm ok either. ---------------------------------------- Feature #11607: [PATCH] fiddle: release GVL for ffi_call https://bugs.ruby-lang.org/issues/11607#change-54575 * Author: Eric Wong * Status: Open * Priority: Normal * Assignee: Aaron Patterson ---------------------------------------- Some external functions I wish to call may take a long time and unnecessarily block other threads. This may lead to performance regressions for fast functions as releasing/acquiring the GVL is not cheap, but can improve performance for long-running functions in multi-threaded applications. This also means we must reacquire the GVL when calling Ruby-defined callbacks for Fiddle::Closure, meaning we must detect whether the current thread has the GVL by exporting ruby_thread_has_gvl_p in internal.h ---Files-------------------------------- 0001-fiddle-release-GVL-for-ffi_call.patch (11.3 KB) fiddle-release-GVL-for-ffi_call-v2.patch (11.2 KB) -- https://bugs.ruby-lang.org/