Closed ioquatix closed 1 year ago
I've tried the patch and I get errors when running the tests. Do you think it has to be an instance variable @mutex
or it can be a class variable @@mutex
?
Do you have CI? e.g. GitHub Actions.
You could experiment with the alternative code I gave you which makes it per-class rather than shared.
I tried it! But I get an error. You don't get errors?
I tested the code in isolation to check it behaved the same, but not running tests for this project. Can you set up CI?
Yes, I'll do it tomorrow as it's already late here. Thanks!
Bump :)
Don't lazy initialize mutex, it's not thread safe.
If you intended to have one unique mutex per class (e.g. derived classes have a unique mutex) I believe something like this is required...