[ruby-cvs:68106] normal:r60925 (trunk): file: release GVL for access(2) syscalls

normal at ruby-lang.org normal at ruby-lang.org
Tue Nov 28 12:28:35 JST 2017

normal	2017-11-28 12:28:35 +0900 (Tue, 28 Nov 2017)

  New Revision: 60925


    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

  Modified files:

More information about the ruby-cvs mailing list