[ruby-cvs:68025] normal:r60844 (trunk): file: File#truncate and File.truncate release GVL

normal at ruby-lang.org normal at ruby-lang.org
Sun Nov 19 07:45:11 JST 2017


normal	2017-11-19 07:45:11 +0900 (Sun, 19 Nov 2017)

  New Revision: 60844

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

  Log:
    file: File#truncate and File.truncate release GVL
    
    Like IO#write and IO.open, these file operations have
    unpredictable performance on slow file systems.  Allow other
    threads of the VM to proceed while they are taking place.
    
    * file.c (nogvl_truncate): extract from rb_file_s_truncate
      (rb_file_s_truncate): release GVL
      (nogvl_ftruncate): extract from rb_file_truncate
      (rb_file_truncate): release GVL

  Modified files:
    trunk/file.c


More information about the ruby-cvs mailing list