1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-03 21:08:17 +08:00

add comment to fix race

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
This commit is contained in:
Brian Tiger Chow
2014-12-16 21:25:37 -08:00
committed by Juan Batiz-Benet
parent b41fef2fff
commit cc2a7312a2

View File

@ -23,9 +23,11 @@ type Envelope struct {
}
type LedgerManager struct {
lock sync.RWMutex
ledgerMap ledgerMap
bs bstore.Blockstore
lock sync.RWMutex
ledgerMap ledgerMap
bs bstore.Blockstore
// FIXME tasklist isn't threadsafe nor is it protected by a mutex. consider
// a way to avoid sharing the tasklist between the worker and the receiver
tasklist *taskList
outbox chan Envelope
workSignal chan struct{}