From: normalperson@... Date: 2017-10-01T04:24:55+00:00 Subject: [ruby-core:83071] [Ruby trunk Feature#13958] [PATCH] Dir.empty? releases GVL 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: