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

Remove mu Lock from WaitTimeOut #383

Merged
merged 1 commit into from Nov 15, 2019
Merged

Remove mu Lock from WaitTimeOut #383

merged 1 commit into from Nov 15, 2019

Conversation

MattBrittan
Copy link
Contributor

@MattBrittan MattBrittan commented Nov 8, 2019

Because the mutex is also locked in SetError this
caused WaitTimeOut to always wait until the timer
expired in the case of an error.
As WaitTimeOut does not access any struct members
other than the pipe I see no reason to lock the
mutex (it appears to data back from when an struct var
, .ready, was accessed).

closes #382

Signed-off-by: Matt Brittan matt@brittan.nz

Because the mutex is also locked in SetError this
caused WaitTimeOut to always wait until the timer
expired in the case of an error.
As WaitTimeOut does not access any struct members
other than the pipe I see no reason to lock the
mutex (it appears to data back from when an struct var
, .ready, was accessed).

closes #40

Signed-off-by: Matt Brittan <matt@brittan.nz>
@alsm
Copy link
Contributor

alsm commented Nov 15, 2019

Thanks

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.

baseToken.WaitTimeout can not return earlier even if the operation has failed with an error
2 participants