[ruby-cvs:67950] normal:r60769 (trunk): dir.c: release GVL around remaining readdir calls
normal at ruby-lang.org
normal at ruby-lang.org
Wed Nov 15 08:20:31 JST 2017
normal 2017-11-15 08:20:31 +0900 (Wed, 15 Nov 2017)
New Revision: 60769
https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60769
Log:
dir.c: release GVL around remaining readdir calls
Release GVL around all remaining readdir calls from the Dir
class to prevent pathological stalls on slow filesystems in
multi-threaded applications.
opendir, rewinddir, closedir calls are not affected yet, but
will be changed in future commits.
In the future, further work may be done consolidate multiple GVL
releasing calls to reduce overhead, similar to how changes to
Dir.empty? were made in r60111
* dir.c (nogvl_readdir): new function
(readdir_without_gvl): ditto
(dir_read): s/READDIR/readdir_without_gvl/
(dir_each_entry): ditto
(glob_helper): ditto
Modified files:
trunk/dir.c
More information about the ruby-cvs
mailing list