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-bitswap
Commits
de59d5c1
Commit
de59d5c1
authored
Apr 17, 2015
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add more bitswap task workers
parent
6bae251a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
workers.go
workers.go
+8
-4
No files found.
workers.go
View file @
de59d5c1
...
...
@@ -9,16 +9,20 @@ import (
u
"github.com/ipfs/go-ipfs/util"
)
var
TaskWorkerCount
=
4
func
(
bs
*
Bitswap
)
startWorkers
(
px
process
.
Process
,
ctx
context
.
Context
)
{
// Start up a worker to handle block requests this node is making
px
.
Go
(
func
(
px
process
.
Process
)
{
bs
.
clientWorker
(
ctx
)
})
// Start up a worker to handle requests from other nodes for the data on this node
px
.
Go
(
func
(
px
process
.
Process
)
{
bs
.
taskWorker
(
ctx
)
})
// Start up workers to handle requests from other nodes for the data on this node
for
i
:=
0
;
i
<
TaskWorkerCount
;
i
++
{
px
.
Go
(
func
(
px
process
.
Process
)
{
bs
.
taskWorker
(
ctx
)
})
}
// Start up a worker to manage periodically resending our wantlist out to peers
px
.
Go
(
func
(
px
process
.
Process
)
{
...
...
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