Skip to content
Discussion options

You must be logged in to vote

Switching to SRWL will slightly reduce the cost of locks, but it will have a very minor impact on overall performance.

Actually libmdbx already has a substitute for SRWL used when running on Windows XP, but critical sections are still in use because ones provide deadlock detection/prevention (via native exceptions handling). Such detection is required to return an error code in case of invalid API usage, instead of a hard deadlock that looks like one or more processes are hanging somewhere inside libmdbx by an unknown reason.

It is possible to implement us own deadlock detection mechanism for using SRWL, but this will slightly increase overhead, which will reduce the benefits of using SRW…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@orz--
Comment options

Answer selected by erthink
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #326 on May 23, 2026 12:04.