mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 23:16:53 +00:00
(Engine) Bugfix: Unlocking an unlocked mutex PANIC + Increase dispatcher job capacity via commandline (#371)
* Removes lock unlock timer and instead sets unlocks between getting a nonce and sending a payload. Increases dispatch channel buffer to deal with len(enabledCurrencies) > ~100 * Adds additional comments to help explain the situation * Fixes bug that could unlock mutex too early * Fixes LIES where Gemini gets a nonce and then proceeds to declare it doesn't get a nonce causing an unrecoverable lock * Fun new concept! The creation of a tested timed mutex. Unlocking an unlocked mutex cannot occur and response can be checked to verify whether the mutex was unlocked from timeout or command. * Adds new cmd parameter "dispatchjobbuffer" * Expands comments and renames benchmark. Makes `Timer` property private * Happy little linters * Renames jobBuffer and all related instances to jobs limit * Tiny error message update * Grammatical fix and setting dispatch.Start to use defaults
This commit is contained in:
@@ -8,8 +8,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// DefaultJobBuffer defines a maxiumum amount of jobs allowed in channel
|
||||
DefaultJobBuffer = 100
|
||||
// DefaultJobsLimit defines a maxiumum amount of jobs allowed in channel
|
||||
DefaultJobsLimit = 100
|
||||
|
||||
// DefaultMaxWorkers is the package default worker ceiling amount
|
||||
DefaultMaxWorkers = 10
|
||||
@@ -47,7 +47,6 @@ type Dispatcher struct {
|
||||
|
||||
// MaxWorkers defines max worker ceiling
|
||||
maxWorkers int32
|
||||
|
||||
// Atomic values -----------------------
|
||||
// Worker counter
|
||||
count int32
|
||||
|
||||
Reference in New Issue
Block a user