Project

General

Profile

« Previous | Next » 

Revision fbb34327

Added by normal over 6 years ago

file.c: release GVL around lstat(2)

Like stat(2), lstat(2) can be expensive on slow filesystems and
should not block other threads. There should be a minor, but
not significant slowdowns in single-threaded performance similar
to benchmarks around the more-portable stat(2):
[ruby-core:83012] [Bug #13941]

  • file.c (no_gvl_lstat): new function for rb_thread_call_without_gvl
    (lstat_without_gvl): new wrapper to replace lstat(2) calls
    (rb_file_s_lstat): s/lstat/&_without_gvl/
    (rb_file_lstat): ditto
    (rb_file_symlink_p): ditto
    (rb_file_s_ftype): ditto
    (rb_file_expand_path_internal): ditto
    (realpath_rec): ditto
    [ruby-core:83075] [Feature #13963]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e