mdbx: workaround for Windows LockFileEx/WriteFile bug.

This resolves https://github.com/leo-yuriev/libmdbx/issues/25
This commit is contained in:
Leo Yuriev
2018-01-31 15:15:54 +03:00
parent 5c9baa06b9
commit 5cfec7a832
3 changed files with 22 additions and 1 deletions

View File

@@ -743,6 +743,8 @@ struct MDBX_env {
#if defined(_WIN32) || defined(_WIN64)
SRWLOCK me_remap_guard;
/* Workaround for LockFileEx and WriteFile multithread bug */
CRITICAL_SECTION me_windowsbug_lock;
#else
mdbx_fastmutex_t me_remap_guard;
#endif