diff options
author | Eric Milkie <milkie@10gen.com> | 2013-05-22 14:19:06 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2013-05-22 16:39:10 -0400 |
commit | 80096f6d290ea0e9f065a9fbab6914269ef8d171 (patch) | |
tree | 64672b7cf3ec7489f24339fb3300ce57d3128267 | |
parent | 6f73c167a1388b89702bcbf3e9dada449679f614 (diff) | |
download | mongo-80096f6d290ea0e9f065a9fbab6914269ef8d171.tar.gz |
SERVER-9721 do not use sleepmicros on Windows for yielding
-rw-r--r-- | src/mongo/db/clientcursor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/clientcursor.cpp b/src/mongo/db/clientcursor.cpp index 764abb3f2e7..a0693dd8c7d 100644 --- a/src/mongo/db/clientcursor.cpp +++ b/src/mongo/db/clientcursor.cpp @@ -571,7 +571,11 @@ namespace mongo { // This sleep helps reader threads yield to writer threads. // Without this, the underlying reader/writer lock implementations // are not sufficiently writer-greedy. +#ifdef _WIN32 + SwitchToThread(); +#else sleepmicros(1); +#endif } else { if ( micros == -1 ) |