19.02.2026 3:08, Adriano dos Santos Fernandes:
I really see that code allows such result. Perhaps adding some delay while
lock is taken would make probability of collisions higher. But it will not
change the fact that this test should expect zero fails (or zero success).
> It could be that in MacOS locks are serialized, but for me, this would
> still mean the implementation is far from good.
Or it runs on single CPU, for example. If you expect that lock manager lock
will "fly" like light-weight mutex - I'll disappoint you, sorry.
In any case, you may try to improve the code. And correct the checks in tests.
BTW, it will be good to add descriptions in tests of what it expects and why.
Regards,
Vlad