mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
dispatcher: prevent job limit errors with no subscribers (#1196)
* prevent dispatch error limit * fixes typo, update benchmark * big simplification on concept * fix tests * can't stop finding leftovers
This commit is contained in:
@@ -53,6 +53,9 @@ type Dispatcher struct {
|
||||
|
||||
// dispatcher write protection
|
||||
m sync.RWMutex
|
||||
// subscriberCount atomically stores the amount of subscription endpoints
|
||||
// to verify whether to send out any jobs
|
||||
subscriberCount int32
|
||||
}
|
||||
|
||||
// job defines a relaying job associated with a ticket which allows routing to
|
||||
|
||||
Reference in New Issue
Block a user