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-blockservice
Commits
bfa72bb6
Commit
bfa72bb6
authored
Sep 08, 2015
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use new methods from goprocess/context, remove thirdparty/waitable
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
parent
e2f87ba0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
worker/worker.go
worker/worker.go
+2
-2
No files found.
worker/worker.go
View file @
bfa72bb6
...
...
@@ -7,11 +7,11 @@ import (
"time"
process
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess"
procctx
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/context"
ratelimit
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/ratelimit"
blocks
"github.com/ipfs/go-ipfs/blocks"
key
"github.com/ipfs/go-ipfs/blocks/key"
exchange
"github.com/ipfs/go-ipfs/exchange"
waitable
"github.com/ipfs/go-ipfs/thirdparty/waitable"
util
"github.com/ipfs/go-ipfs/util"
)
...
...
@@ -121,7 +121,7 @@ func (w *Worker) start(c Config) {
// reads from |workerChan| until w.process closes
limiter
:=
ratelimit
.
NewRateLimiter
(
w
.
process
,
c
.
NumWorkers
)
limiter
.
Go
(
func
(
proc
process
.
Process
)
{
ctx
:=
waitable
.
Context
(
proc
)
// shut down in-progress HasBlock when time to die
ctx
:=
procctx
.
OnClosing
Context
(
proc
)
// shut down in-progress HasBlock when time to die
for
{
select
{
case
<-
proc
.
Closing
()
:
...
...
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