From: ngotogenome@... Date: 2015-12-03T03:14:26+00:00 Subject: [ruby-core:71808] [Ruby trunk - Feature #11607] [PATCH] fiddle: release GVL for ffi_call Issue #11607 has been updated by Naohisa Goto. After r52723, SEGV occurred during Fiddle::TestFunc#test_qsort1 test/fiddle/test_func.rb:83 on Solaris 10 i386 on RubyCI. (r52725) http://rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20151123T224815Z.fail.html.gz Because this occurred in the CI environment, no other detailed information was available. This is not reproduced on sparc Solaris. ---------------------------------------- Feature #11607: [PATCH] fiddle: release GVL for ffi_call https://bugs.ruby-lang.org/issues/11607#change-55213 * Author: Eric Wong * Status: Closed * 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/