Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CriticalSectionLock class as a lightweight replacement for std::mutex on Windows platforms. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GitHubGanesh
Copy link
Owner

This change introduces a CriticalSectionLock class as a lightweight replacement for std::mutex on Windows platforms. This code is conditionally compiled when GOOGLE_PROTOBUF_SUPPORT_WINDOWS_XP is defined.

std::mutex does not work on Windows XP SP2 with the latest VC++ libraries, because it utilizes the Concurrency Runtime that uses ::GetLogicalProcessorInformation which is only supported on Windows XP SP3 and above.

This change introduces a CriticalSectionLock class as a lightweight replacement for std::mutex on Windows platforms. std::mutex does not work on Windows XP SP2 with the latest VC++ libraries, because it utilizes the Concurrency Runtime that uses ::GetLogicalProcessorInformation which is only supported on Windows XP SP3 and above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant