summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.cpp
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2013-07-17 16:21:49 +0200
committerAntonin Kral <a.kral@bobek.cz>2013-07-17 16:21:49 +0200
commite3904bf97e74cbbe5dde6b3abc3e797ad7d26b5d (patch)
treef2d76fa86bfce0e897a616e02551bdd7d9913682 /src/mongo/db/clientcursor.cpp
parentbef4346b845150d5318fd7a0acb43554f0d40a06 (diff)
Imported Upstream version 2.4.5upstream/2.4.5
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-rw-r--r--src/mongo/db/clientcursor.cpp4
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 )