summaryrefslogtreecommitdiff
path: root/src/os_win/os_sleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_win/os_sleep.c')
-rw-r--r--src/os_win/os_sleep.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/os_win/os_sleep.c b/src/os_win/os_sleep.c
index 4b6bdaea0be..477474e0665 100644
--- a/src/os_win/os_sleep.c
+++ b/src/os_win/os_sleep.c
@@ -18,8 +18,15 @@ __wt_sleep(uint64_t seconds, uint64_t micro_seconds)
DWORD dwMilliseconds;
/*
- * If the caller wants a small pause, set to our
- * smallest granularity.
+ * Sleeping isn't documented as a memory barrier, and it's a reasonable
+ * expectation to have. There's no reason not to explicitly include a
+ * barrier since we're giving up the CPU, and ensures callers are never
+ * surprised.
+ */
+ WT_FULL_BARRIER();
+
+ /*
+ * If the caller wants a small pause, set to our smallest granularity.
*/
if (seconds == 0 && micro_seconds < WT_THOUSAND)
micro_seconds = WT_THOUSAND;