-
Notifications
You must be signed in to change notification settings - Fork 603
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
Task Ref now increments nonce with every set #749
Conversation
|
||
/** | ||
* Created by adamchlupacek on 22/10/16. | ||
*/ |
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.
Please update comment to be inline with rest of fs2
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.
I will remove this one all together
@pchiusano @mpilquist If there are no objections can we merge this? |
|
||
"Task" - { | ||
"Ref" - { | ||
"Set increments nonce" in { |
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.
I think nonce is here internal implementation detail. What we really solving here is interleaving set and modify// access. I would prefer updated name with perhaps a short comment explaining what this tests verifies.
👍 Per Pavel's last comment, let's update the test name and then we can merge. |
👍 On Mon, Oct 24, 2016 at 4:20 AM, Pavel Chlupacek notifications@github.com
|
As per comments in
fs2.Task.ref
the nonce should be updated with every successful set or modify, up till now for set the nonce was updated only in case of the first set, this PR addresses this issue.Added a test that demonstrates the case in which this would be an issue. This would also affect modify of the ref in case there was a concurrent set on it.