Commit bb99f55b authored by Jeromy's avatar Jeromy

add warning comment about possibly leaked goroutines

parent 8de772f4
...@@ -260,6 +260,9 @@ loop: ...@@ -260,6 +260,9 @@ loop:
select { select {
case <-done: case <-done:
case <-ctx.Done(): case <-ctx.Done():
// NB: we may be abandoning goroutines here before they complete
// this shouldnt be an issue because they will complete soon anyways
// we just don't want their being slow to impact bitswap transfer speeds
} }
return nil return nil
} }
...@@ -412,6 +415,9 @@ func (bs *Bitswap) wantNewBlocks(ctx context.Context, bkeys []u.Key) { ...@@ -412,6 +415,9 @@ func (bs *Bitswap) wantNewBlocks(ctx context.Context, bkeys []u.Key) {
select { select {
case <-done: case <-done:
case <-ctx.Done(): case <-ctx.Done():
// NB: we may be abandoning goroutines here before they complete
// this shouldnt be an issue because they will complete soon anyways
// we just don't want their being slow to impact bitswap transfer speeds
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment