-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Put mutexes under a preprocessed condition. #3868
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
Conversation
This will enable to compile the code if in some cases you do not have mutex support in the standard library. Assuming you have one core as well. Signed-off-by: Omar Shrit <[email protected]>
Signed-off-by: Omar Shrit <[email protected]>
rcurtin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me. I guess we don't really have any style rules for how to put #ifdefs inside the code... to me it looks a little ugly with the indentation but I have no other suggestion. So I think it is just fine 😄
Co-authored-by: Ryan Curtin <[email protected]>
Signed-off-by: Omar Shrit <[email protected]>
rcurtin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Want to add an entry to HISTORY.md indicating that we added the MLPACK_NO_STD_MUTEX definition for disabling use of std::mutex?
Signed-off-by: Omar Shrit <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second approval provided automatically after 24 hours. 👍
This will enable to compile the code if in some cases you do not have mutex support in the standard library. Assuming you have one core as well.