[#83107] Alias Enumerable#include? to Enumerable#includes? — Alberto Almagro <albertoalmagro@...>

Hello,

9 messages 2017/10/04

[ruby-core:83071] [Ruby trunk Feature#13958] [PATCH] Dir.empty? releases GVL

From: normalperson@...
Date: 2017-10-01 04:24:55 UTC
List: ruby-core #83071
Issue #13958 has been reported by normalperson (Eric Wong).

----------------------------------------
Feature #13958: [PATCH] Dir.empty? releases GVL
https://bugs.ruby-lang.org/issues/13958

* Author: normalperson (Eric Wong)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
This converts all slow syscalls in the Dir.empty? implementation
to release GVL.  We avoid unnecessarily GVL release and
reacquire for each slow call (opendir, readdir, closedir) and
instead only release and acquire the GVL once in the common
case.

* dir.c (rb_gc_for_fd_with_gvl): new function
  (nogvl_dir_empty_p): ditto
  (dir_s_empty_p): use new functions to release GVL


---Files--------------------------------
0001-Dir.empty-releases-GVL.patch (3.08 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next