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 4AFE619C0036 for ; Tue, 27 Oct 2015 05:59:39 +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 E139DB5D88A for ; Tue, 27 Oct 2015 06:27:22 +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 F0AD095241E for ; Tue, 27 Oct 2015 06:27:22 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 69BCC120466; Tue, 27 Oct 2015 06:27:21 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id 0A684120455 for ; Tue, 27 Oct 2015 06:27:13 +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=atNc/1G1GnssnGfC9c6Igd349G4=; b=LKm+xo0Of3kd7lvKJC 5+itAMOuAdWBctIHetzu5GX7q3BdCEcSX5qxH8bd3FPFXOb6a/pDktCjMGZr2ZMa SGsezmehssAQl470+LizGdEq/9Xm1dBoQnKT+2JifgRQTjqxBdRZAwaq2trXK2Yd 9yRHJqvMvQZGUKqyTnV+oKnnE= Received: by filter0604p1mdw1.sendgrid.net with SMTP id filter0604p1mdw1.19685.562E9AA75 2015-10-26 21:27:03.140502872 +0000 UTC Received: from herokuapp.com (ec2-54-90-98-226.compute-1.amazonaws.com [54.90.98.226]) by ismtpd0003p1iad1.sendgrid.net (SG) with ESMTP id YjTAALrqTnm3_bjB-9yAQA Mon, 26 Oct 2015 21:27:03.167 +0000 (UTC) Date: Mon, 26 Oct 2015 21:27:03 +0000 From: kosaki.motohiro@gmail.com 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: 45824 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11607 X-Redmine-Issue-Author: normalperson X-Redmine-Issue-Assignee: tenderlovemaking X-Redmine-Sender: kosaki 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS7f04uOPz15BJEi4awHABrmpLmed00Lh8QnCO ifLTZcKktHK8izVg7M70cxY+JX6wKBak8DrfqtAICrjZSuXDHaauZ0r+ab/2we41gtU9ReCANjHP+a RHEMuMO3PlbqgOY0R3nZv557N67JHjt1S+Q+ X-ML-Name: ruby-core X-Mail-Count: 71197 Subject: [ruby-core:71197] [Ruby trunk - Feature #11607] [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 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/