Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
add ContextWithTimeout and ContextWithDeadline #282
Conversation
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-utils |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-utils |
|
Build failed: Tests failed |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-utils |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-utils |
jujubot
merged commit 60474fc
into
juju:master
Jun 15, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rogpeppe commentedJun 15, 2017
The stdlib context package doesn't make it easy to use
deadlines and timeouts with mock clocks. These
new functions mimic context.WithTimeout and context.WithDeadline
but using mockable clocks instead.
This does come at some cost - an extra goroutine will
be used when none was needed previously.