Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
e2601ebc
Commit
e2601ebc
authored
Jun 18, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1392 from ipfs/update-goprocess-dep
update goprocess godep
parents
41b7f6d3
c274a3f6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
12 deletions
+26
-12
Godeps/Godeps.json
Godeps/Godeps.json
+5
-1
Godeps/_workspace/src/github.com/jbenet/goprocess/goprocess.go
...s/_workspace/src/github.com/jbenet/goprocess/goprocess.go
+3
-0
Godeps/_workspace/src/github.com/jbenet/goprocess/goprocess_test.go
...rkspace/src/github.com/jbenet/goprocess/goprocess_test.go
+7
-11
Godeps/_workspace/src/github.com/jbenet/goprocess/impl-mutex.go
.../_workspace/src/github.com/jbenet/goprocess/impl-mutex.go
+10
-0
util/sadhack/godep.go
util/sadhack/godep.go
+1
-0
No files found.
Godeps/Godeps.json
View file @
e2601ebc
...
...
@@ -38,6 +38,10 @@
"ImportPath"
:
"github.com/cheggaaa/pb"
,
"Rev"
:
"d7729fd7ec1372c15b83db39834bf842bf2d69fb"
},
{
"ImportPath"
:
"github.com/chriscool/go-sleep"
,
"Rev"
:
"743ab5f1bb487edf1772bc29ca0bdf572b40785e"
},
{
"ImportPath"
:
"github.com/codahale/hdrhistogram"
,
"Rev"
:
"5fd85ec0b4e2dd5d4158d257d943f2e586d86b62"
...
...
@@ -184,7 +188,7 @@
},
{
"ImportPath"
:
"github.com/jbenet/goprocess"
,
"Rev"
:
"
ea63e9540cd19cb39e0e4c4442b9c27664287bb8
"
"Rev"
:
"
67fe91f1081e806f1bb51051c972ac782ea46d85
"
},
{
"ImportPath"
:
"github.com/kardianos/osext"
,
...
...
Godeps/_workspace/src/github.com/jbenet/goprocess/goprocess.go
View file @
e2601ebc
...
...
@@ -115,6 +115,9 @@ type Process interface {
// It is useful to construct simple asynchronous workers, children of p.
Go
(
f
ProcessFunc
)
Process
// SetTeardown sets the process's teardown to tf.
SetTeardown
(
tf
TeardownFunc
)
// Close ends the process. Close blocks until the process has completely
// shut down, and any teardown has run _exactly once_. The returned error
// is available indefinitely: calling Close twice returns the same error.
...
...
Godeps/_workspace/src/github.com/jbenet/goprocess/goprocess_test.go
View file @
e2601ebc
...
...
@@ -123,17 +123,13 @@ func TestTeardownCalledOnce(t *testing.T) {
}
}
setTeardown
:=
func
(
t
tree
,
tf
TeardownFunc
)
{
t
.
Process
.
(
*
process
)
.
teardown
=
tf
}
setTeardown
(
a
,
onlyOnce
())
setTeardown
(
a
.
c
[
0
],
onlyOnce
())
setTeardown
(
a
.
c
[
0
]
.
c
[
0
],
onlyOnce
())
setTeardown
(
a
.
c
[
0
]
.
c
[
1
],
onlyOnce
())
setTeardown
(
a
.
c
[
1
],
onlyOnce
())
setTeardown
(
a
.
c
[
1
]
.
c
[
0
],
onlyOnce
())
setTeardown
(
a
.
c
[
1
]
.
c
[
1
],
onlyOnce
())
a
.
SetTeardown
(
onlyOnce
())
a
.
c
[
0
]
.
SetTeardown
(
onlyOnce
())
a
.
c
[
0
]
.
c
[
0
]
.
SetTeardown
(
onlyOnce
())
a
.
c
[
0
]
.
c
[
1
]
.
SetTeardown
(
onlyOnce
())
a
.
c
[
1
]
.
SetTeardown
(
onlyOnce
())
a
.
c
[
1
]
.
c
[
0
]
.
SetTeardown
(
onlyOnce
())
a
.
c
[
1
]
.
c
[
1
]
.
SetTeardown
(
onlyOnce
())
a
.
c
[
0
]
.
c
[
0
]
.
Close
()
a
.
c
[
0
]
.
c
[
0
]
.
Close
()
...
...
Godeps/_workspace/src/github.com/jbenet/goprocess/impl-mutex.go
View file @
e2601ebc
...
...
@@ -114,6 +114,16 @@ func (p *process) Go(f ProcessFunc) Process {
return
child
}
// SetTeardown to assign a teardown function
func
(
p
*
process
)
SetTeardown
(
tf
TeardownFunc
)
{
if
tf
==
nil
{
tf
=
nilTeardownFunc
}
p
.
Lock
()
p
.
teardown
=
tf
p
.
Unlock
()
}
// Close is the external close function.
// it's a wrapper around internalClose that waits on Closed()
func
(
p
*
process
)
Close
()
error
{
...
...
util/sadhack/godep.go
View file @
e2601ebc
...
...
@@ -6,3 +6,4 @@ import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/dustin/go-hum
// similar to the above, only used in the tests makefile
import
_
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/whyrusleeping/iptb"
import
_
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/chriscool/go-sleep"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment