We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
This code has race condition:
while true do_something if blocking_flag.set? # here blocking_flag.wait_for_set end end
because "here" does not acquire mutex. It should be like this:
while true do_something blocking_flag.synchronize do if blocking_flag.set? # here blocking_flag.wait_for_set end end end
Thus BlockingFlag#synchronize(&block) or similar interface is necessary.
BlockingFlag#synchronize(&block)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This code has race condition:
because "here" does not acquire mutex. It should be like this:
Thus
BlockingFlag#synchronize(&block)
or similar interface is necessary.The text was updated successfully, but these errors were encountered: