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
platform: add CriticalSectionLock #4962
Conversation
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.
Does it make sense to wrap it in NonCopyable
?
We could have simple test for that (and C version) ;) Could you add a ticket to IOTMORF-1036? |
Created |
@bulislaw Would be better if the class was marked as non copyable. @0xc0170 It might be interesting to add a CriticalSectionLock cs_lock;
// part of the algorithm needing the lock.
// For example finding a value in a shared data structure
cs_lock.unlock();
// part of the algorithm that can run without the lock
// For example computing a value from the data found.
cs_lock.lock();
// part of the algorithm needing the lock.
// For example finding adding the result in a shared data structure |
Critical section class RAII addition
89279d8
to
be8174f
Compare
@pan- Updated |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Critical section class RAII addition
I realized we dont have it here, and often used C API. This file is based on the class we used to have in core-util module (same thing, no changes, just different location).
cc @pan- @sg- @c1728p9 @bulislaw