[前][次][番号順一覧][スレッド一覧]

ruby-changes:33175

From: usa <ko1@a...>
Date: Mon, 3 Mar 2014 02:56:37 +0900 (JST)
Subject: [ruby-changes:33175] usa:r45254 (trunk): * io.c (rb_io_flush_raw, rb_io_fsync): [EXPERIMENTAL] remove force

usa	2014-03-03 02:56:32 +0900 (Mon, 03 Mar 2014)

  New Revision: 45254

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45254

  Log:
    * io.c (rb_io_flush_raw, rb_io_fsync): [EXPERIMENTAL] remove force
      syncing for Win32 to speed up IO.  this may break some tests, and
      they'll be fixed later.
      [ruby-core:58570] [Bug #9153]

  Modified files:
    trunk/ChangeLog
    trunk/io.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 45253)
+++ ChangeLog	(revision 45254)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Mar  3 02:53:53 2014  NAKAMURA Usaku  <usa@r...>
+
+	* io.c (rb_io_flush_raw, rb_io_fsync): [EXPERIMENTAL] remove force
+	  syncing for Win32 to speed up IO.  this may break some tests, and
+	  they'll be fixed later.
+	  [ruby-core:58570] [Bug #9153]
+
 Mon Mar  3 00:17:43 2014  NAKAMURA Usaku  <usa@r...>
 
 	* test/ruby/test_backtrace.rb: get rid of warnings.  unused variable,
Index: io.c
===================================================================
--- io.c	(revision 45253)
+++ io.c	(revision 45254)
@@ -1564,11 +1564,6 @@ rb_io_flush_raw(VALUE io, int sync) https://github.com/ruby/ruby/blob/trunk/io.c#L1564
     if (fptr->mode & FMODE_WRITABLE) {
         if (io_fflush(fptr) < 0)
             rb_sys_fail(0);
-#ifdef _WIN32
-	if (sync && GetFileType((HANDLE)rb_w32_get_osfhandle(fptr->fd)) == FILE_TYPE_DISK) {
-	    rb_thread_io_blocking_region(nogvl_fsync, fptr, fptr->fd);
-	}
-#endif
     }
     if (fptr->mode & FMODE_READABLE) {
         io_unread(fptr);
@@ -1930,10 +1925,6 @@ rb_io_fsync(VALUE io) https://github.com/ruby/ruby/blob/trunk/io.c#L1925
 
     if (io_fflush(fptr) < 0)
         rb_sys_fail(0);
-# ifndef _WIN32	/* already called in io_fflush() */
-    if ((int)rb_thread_io_blocking_region(nogvl_fsync, fptr, fptr->fd) < 0)
-	rb_sys_fail_path(fptr->pathv);
-# endif
     return INT2FIX(0);
 }
 #else

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]