summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--win32/win32.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 45338018d5..dd26a38172 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Sep 18 14:30:40 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (rb_w32_select): on 1.8, we don't need to poll sockets,
+ because our select is never called from multiple threads.
+
Thu Sep 17 14:33:37 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_thread_start_0, rb_thread_start_1): should call star
diff --git a/win32/win32.c b/win32/win32.c
index 4cd7a1917f..d163e78ee2 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -2347,7 +2347,7 @@ rb_w32_select(int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
if (rd) orig_rd = *rd;
if (wr) orig_wr = *wr;
if (ex) orig_ex = *ex;
- r = do_select(nfds, rd, wr, ex, &zero); // polling
+ r = do_select(nfds, rd, wr, ex, dowait);
if (r != 0) break; // signaled or error
if (rd) *rd = orig_rd;
if (wr) *wr = orig_wr;
@@ -2360,7 +2360,6 @@ rb_w32_select(int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
if (!subtract(&rest, &now)) break;
if (compare(&rest, &wait) < 0) dowait = &rest;
}
- Sleep(dowait->tv_sec * 1000 + dowait->tv_usec / 1000);
}
}
}