Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(388)

Issue 42760043: utils/parallel: concurrent attempts

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 4 months ago by rog
Modified:
10 years, 4 months ago
Reviewers:
mp+199099, natefinch, dimitern
Visibility:
Public.

Description

utils/parallel: concurrent attempts Introducing a new type, parallel.Try, which should be a useful primitive when making concurrent connection attempts. https://code.launchpad.net/~rogpeppe/juju-core/473-parallel-try/+merge/199099 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 6

Patch Set 2 : utils/parallel: concurrent attempts #

Patch Set 3 : utils/parallel: concurrent attempts #

Total comments: 8

Patch Set 4 : utils/parallel: concurrent attempts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+579 lines, -0 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
A utils/parallel/try.go View 1 2 3 1 chunk +199 lines, -0 lines 0 comments Download
A utils/parallel/try_test.go View 1 2 3 1 chunk +378 lines, -0 lines 0 comments Download

Messages

Total messages: 6
natefinch
LGTM. Ideally I'd like to see this as a standalone package, but I know that ...
10 years, 4 months ago (2013-12-16 13:32:23 UTC) #1
rog
Please take a look. https://codereview.appspot.com/42760043/diff/1/utils/parallel/try.go File utils/parallel/try.go (right): https://codereview.appspot.com/42760043/diff/1/utils/parallel/try.go#newcode133 utils/parallel/try.go:133: // to limit memory usage ...
10 years, 4 months ago (2013-12-16 15:34:19 UTC) #2
natefinch
On 2013/12/16 15:34:19, rog wrote: > https://codereview.appspot.com/42760043/diff/1/utils/parallel/try.go#newcode135 > utils/parallel/try.go:135: f := func() { > On ...
10 years, 4 months ago (2013-12-16 16:06:06 UTC) #3
rog
Please take a look.
10 years, 4 months ago (2013-12-16 16:25:05 UTC) #4
dimitern
LGTM, apart from a few typos and imports ordering. https://codereview.appspot.com/42760043/diff/40001/utils/parallel/try.go File utils/parallel/try.go (right): https://codereview.appspot.com/42760043/diff/40001/utils/parallel/try.go#newcode6 utils/parallel/try.go:6: ...
10 years, 4 months ago (2013-12-17 11:06:37 UTC) #5
rog
10 years, 4 months ago (2013-12-17 11:23:49 UTC) #6
Please take a look.

https://codereview.appspot.com/42760043/diff/40001/utils/parallel/try.go
File utils/parallel/try.go (right):

https://codereview.appspot.com/42760043/diff/40001/utils/parallel/try.go#newc...
utils/parallel/try.go:6: "launchpad.net/tomb"
On 2013/12/17 11:06:37, dimitern wrote:
> import (
>   "errors"
>   "io"
>   ...
> 
>   "launchpad.net/tomb"
> )

Done.

https://codereview.appspot.com/42760043/diff/40001/utils/parallel/try.go#newc...
utils/parallel/try.go:15: type Try struct {
On 2013/12/17 11:06:37, dimitern wrote:
> a doc comment would be nice.

Done.

https://codereview.appspot.com/42760043/diff/40001/utils/parallel/try.go#newc...
utils/parallel/try.go:30: // positive, it limits the nunber of concurrently
running functions.
On 2013/12/17 11:06:37, dimitern wrote:
> s/nunber/number/

Done.

https://codereview.appspot.com/42760043/diff/40001/utils/parallel/try_test.go
File utils/parallel/try_test.go (right):

https://codereview.appspot.com/42760043/diff/40001/utils/parallel/try_test.go...
utils/parallel/try_test.go:10: gc "launchpad.net/gocheck"
On 2013/12/17 11:06:37, dimitern wrote:
> please put gocheck on a separate line, after std imports

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b