This should be a simple improvement. Ruleset object is not currently thread safe, so different goroutines need to initialize separate rulesets. Yet a simple sync.RWMutex should do the trick here and it should not even affect performance much as ruleset is only read after initial creation.
This should be a simple improvement. Ruleset object is not currently thread safe, so different goroutines need to initialize separate rulesets. Yet a simple
sync.RWMutex
should do the trick here and it should not even affect performance much as ruleset is only read after initial creation.