mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-16 11:06:40 +00:00

* [NOD-248] Implement waitgroup to enable waiting while adding * [NOD-248] fix waitGroup.done() error message * [NOD-248] atomically read wg.counter * [NOD-248] return lowPriorityMutex * [NOD-249] Add tests to waitgroup * [NOD-249] Change waitgroup to use channels * [NOD-249] Format project * [NOD-249] Add comments and logs to waitGroup, and remove timeouts from prioritymutex_test.go * [NOD-249] Fix comments
23 lines
596 B
Go
23 lines
596 B
Go
// Copyright (c) 2013-2014 The btcsuite developers
|
|
// Use of this source code is governed by an ISC
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package locks
|
|
|
|
import (
|
|
"github.com/btcsuite/btclog"
|
|
"github.com/daglabs/btcd/logger"
|
|
"github.com/daglabs/btcd/util/panics"
|
|
)
|
|
|
|
// log is a logger that is initialized with no output filters. This
|
|
// means the package will not perform any logging by default until the caller
|
|
// requests it.
|
|
var log btclog.Logger
|
|
var spawn func(func())
|
|
|
|
func init() {
|
|
log, _ = logger.Get(logger.SubsystemTags.UTIL)
|
|
spawn = panics.GoroutineWrapperFunc(log)
|
|
}
|