[ruby-cvs:68012] normal:r60831 (trunk): dir.c: openat calls release GVL, too

normal at ruby-lang.org normal at ruby-lang.org
Sat Nov 18 11:01:49 JST 2017


normal	2017-11-18 11:01:49 +0900 (Sat, 18 Nov 2017)

  New Revision: 60831

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60831

  Log:
    dir.c: openat calls release GVL, too
    
    openat(2) also performs a path lookup, so it is also subject
    to pathological slowdowns like opendir(3) and open(2) syscalls.
    
    * dir.c (struct opendir_at_arg): new struct for callback
      (with_gvl_gc_for_fd): new callback for rb_thread_call_with_gvl
      (gc_for_fd_with_gvl): moved up
      (nogvl_opendir_at): extracted from do_opendir
      (opendir_at): new wrapper to release GVL for opendir_at
      (do_opendir): use new wrappers to release GVL
      (nogvl_dir_empty_p): adjust for gc_for_fd_with_gvl

  Modified files:
    trunk/dir.c


More information about the ruby-cvs mailing list