summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-11 05:09:59 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-11 05:09:59 +0000
commit52583c34d1d16ecb33d3d3425dd1d56bebc22e18 (patch)
treeefaeff3c9375c6b5e4bb08f00acfa0145b69ddd0 /io.c
parent5b2c631d31db17777e8c1e5b071131ed255f927e (diff)
merge from trunk (r27718)
* win32/win32.c, include/ruby/win32.h (rb_w32_has_cancel_io): new function. * io.c (WAIT_FD_IN_WIN32): check only when it's not cancelable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/io.c b/io.c
index eccc93b141..00ec9ffdb4 100644
--- a/io.c
+++ b/io.c
@@ -189,9 +189,10 @@ static int max_file_descriptor = NOFILE;
#define READ_CHAR_PENDING(fptr) ((fptr)->cbuf_len)
#if defined(_WIN32)
-#define WAIT_FD_IN_WIN32(fptr) rb_thread_wait_fd((fptr)->fd);
+#define WAIT_FD_IN_WIN32(fptr) \
+ (rb_w32_has_cancel_io() ? 0 : rb_thread_wait_fd((fptr)->fd))
#else
-#define WAIT_FD_IN_WIN32(fptr) ;
+#define WAIT_FD_IN_WIN32(fptr)
#endif
#define READ_CHECK(fptr) do {\