diff options
author | Eric Milkie <milkie@10gen.com> | 2013-05-22 14:19:06 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2013-05-22 14:19:30 -0400 |
commit | bb8d0b4b30dd45e4f46592e98ea770497a3f4bba (patch) | |
tree | 9254fa0c29bdf528cd7b5091c6f1087c62527430 /src/mongo/db/clientcursor.cpp | |
parent | 7e47d066ae2a6635815c4f4f26b5ef546c15d6a5 (diff) | |
download | mongo-bb8d0b4b30dd45e4f46592e98ea770497a3f4bba.tar.gz |
SERVER-9721 do not use sleepmicros on Windows for yielding
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-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 0097e9745e3..38151bd2a8a 100644 --- a/src/mongo/db/clientcursor.cpp +++ b/src/mongo/db/clientcursor.cpp @@ -578,7 +578,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 ) |