From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id A38B719C0029 for ; Tue, 20 Oct 2015 06:20:11 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 0E092B5D86B for ; Tue, 20 Oct 2015 06:47:01 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 1EDBB952439 for ; Tue, 20 Oct 2015 06:47:00 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id B1D5D120487; Tue, 20 Oct 2015 06:46:58 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o2.heroku.sendgrid.net (o2.heroku.sendgrid.net [67.228.50.55]) by neon.ruby-lang.org (Postfix) with ESMTPS id 4234012045C for ; Tue, 20 Oct 2015 06:46:47 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=y/ZET6t8HSCCFZkHrr0Z29nuvEM=; b=STZrELSXMZqdxilYhm zClqO9EmJRIU9RlRMdcE3yC7GKnlqvJBHl4PPIMgI3H94wr5iQhJHiGefLsgeLlP dBQHQVV5d5WaJJlg+aSUObGOATC2z2Qlpo97uMn13ZLcxrtuE2GCkXX4Rm8LVriW bfFhORlhKc8uEnhcOyoyWkHoc= Received: by filter0529p1mdw1.sendgrid.net with SMTP id filter0529p1mdw1.20911.562564C116 2015-10-19 21:46:41.230407503 +0000 UTC Received: from herokuapp.com (ec2-54-81-248-16.compute-1.amazonaws.com [54.81.248.16]) by ismtpd0001p1iad1.sendgrid.net (SG) with ESMTP id fqiMdDKMRkGeHra6SvXLeg for ; Mon, 19 Oct 2015 21:46:41.047 +0000 (UTC) Date: Mon, 19 Oct 2015 21:46:41 +0000 From: normalperson@yhbt.net To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 45746 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11607 X-Redmine-Issue-Author: normalperson X-Redmine-Issue-Assignee: tenderlovemaking X-Redmine-Sender: normalperson X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS6jUsIyL0l5Cz3qLIcybY5yXwmhSl6UzTeTs/ N2at5XJKID//SqP4hmx8fmKakwSuN5Y5KWyB8w2OhV36/tniEm8meHtIKnSn8OL2oU45K5DnNVHl4H MhXXSEWhTyRcbD/Ouh1uYzdc4RvLFQafEao9 X-ML-Name: ruby-core X-Mail-Count: 71121 Subject: [ruby-core:71121] [Ruby trunk - Feature #11607] [Open] [PATCH] fiddle: release GVL for ffi_call X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11607 has been reported by Eric Wong. ---------------------------------------- Feature #11607: [PATCH] fiddle: release GVL for ffi_call https://bugs.ruby-lang.org/issues/11607 * 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) -- https://bugs.ruby-lang.org/