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

SyncVar.take should have overload with timeout #5623

Closed
scabug opened this Issue Mar 27, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@scabug
Copy link

scabug commented Mar 27, 2012

SyncVar has overloads of get with and without timeout. take only has a no-timeout overload. Adding one with timeout would be trivial, I think:

def take(timeout: Long) = synchronized {
try get(timeout)
finally unset()
}

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Mar 27, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5623?orig=1
Reporter: Seth LaForge (sethml)

@scabug

This comment has been minimized.

Copy link
Author

scabug commented May 18, 2012

@heathermiller said:
Good suggestion, added in ce896d6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment