diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-18 05:32:13 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-18 05:32:13 +0000 |
| commit | a9f65bbd696c3fb61fcd4891ed79770a74f4e345 (patch) | |
| tree | c39305a8aad55d05235a9ebfe9872d85a5639a3f | |
| parent | 73b865bd41f9176a45e7f4849e2020e70c0156f4 (diff) | |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | win32/win32.c | 3 |
2 files changed, 6 insertions, 2 deletions
@@ -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); } } } |
