You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AFAIK the Ladon struct could be easily considered thread-safe because all its internal fields (e.g., Matcher, Manager) handle concurrency internally. Although, the lazy initialization isn't thread-safe. For instance, the metric function has a data race because multiple callers can concurrently try to initialize the matcher to the DefaultMetric .
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
What is the expected behavior?
I didn't find any claim that the Ladon struct is thread-safe, but I think with some small changes we can improve this and make a clear statement that this is safe to use from multiple goroutines.
Here is a possible solution with sync.Oncelucarin91#1 which will keep the same interface. But I think we should consider changing the interface and province a constructor, which will be better and simple
Do you want to request a feature or report a bug?
This is probably a feature request
What is the current behavior?
AFAIK the Ladon struct could be easily considered thread-safe because all its internal fields (e.g.,
Matcher
,Manager
) handle concurrency internally. Although, the lazy initialization isn't thread-safe. For instance, themetric
function has a data race because multiple callers can concurrently try to initialize the matcher to theDefaultMetric
.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
What is the expected behavior?
I didn't find any claim that the
Ladon
struct is thread-safe, but I think with some small changes we can improve this and make a clear statement that this is safe to use from multiple goroutines.Here is a possible solution withsync.Once
lucarin91#1 which will keep the same interface. But I think we should consider changing the interface and province a constructor, which will be better and simpleWhich version of the software is affected?
I am testing on master 972387f
The text was updated successfully, but these errors were encountered: