mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-28 00:39:31 +08:00
rename for clarity
This commit is contained in:
@ -29,7 +29,7 @@ func (bs *bitswap) startWorkers(px process.Process, ctx context.Context) {
|
|||||||
// file transfers
|
// file transfers
|
||||||
for i := 0; i < provideWorkers; i++ {
|
for i := 0; i < provideWorkers; i++ {
|
||||||
px.Go(func(px process.Process) {
|
px.Go(func(px process.Process) {
|
||||||
bs.blockReceiveWorker(ctx)
|
bs.provideWorker(ctx)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@ func (bs *bitswap) taskWorker(ctx context.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (bs *bitswap) blockReceiveWorker(ctx context.Context) {
|
func (bs *bitswap) provideWorker(ctx context.Context) {
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case blk, ok := <-bs.newBlocks:
|
case blk, ok := <-bs.newBlocks:
|
||||||
|
Reference in New Issue
Block a user