diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-28 03:28:35 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-28 03:28:35 +0000 |
commit | 17dd212f001572f157a0b1b4b4fc706778b02102 (patch) | |
tree | 9706543d4d5cd461b941fb6b1733c8b68439a99d /test/rubygems | |
parent | d7a38817da04d106e40de817df6dc89d88fb4e58 (diff) | |
download | ruby-17dd212f001572f157a0b1b4b4fc706778b02102.tar.gz |
file: release GVL for access(2) syscalls
Like stat(2), the access(2) syscall may take an indeterminate
amount of time on slow/remote filesystems.
This lets the following methods release the GVL to avoid choking
the entire VM while one thread is stuck on a slow or
non-responsive filesystem:
- File.readable?
- File.readable_real?
- File.writable?
- File.writable_real?
- File.executable?
- File.executable_real?
* file.c (nogvl_eaccess): new function
(nogvl_access): ditto
(rb_access): new wrapper function
(rb_eaccess): release GVL
(rb_file_readable_real_p): use rb_access
(rb_file_writable_real_p): ditto
(rb_file_executable_real_p): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems')
0 files changed, 0 insertions, 0 deletions