3 ms·
Probably you can get away with that simple invocation "most of the time", but what matters is the higher level code that calls it triggers the bug where other a
by asveikau 4y ago
Probably you can get away with that simple invocation "most of the time", but what matters is the higher level code that calls it triggers the bug where other access patterns would not.
Also, I do wonder why they roll their own mutex using condition variables. Most people probably would use a mutex and thus wouldn't hit the condition variable at all. Condition variables are more niche than mutex.
- mbac32768 4y agoAccording to Xavier Leroy (OCaml language dev): > It is possible to use a plain POSIX mutex as master lock, but fairness is awful. https://discuss.ocaml.org/t/is-there-a-known-recent-linux-locking-bug-that-affects-the-ocaml-runtime/6542/11?u=mbacarella https://discuss.ocaml.org/t/is-there-a-known-recent-linux-lo...
- sbf501 4y agoThanks. I've learned more about pthread just from this HN post than I've learned anywhere else online in the past few years. Makes me worried about some of my earlier code now. O_o