Hacker News new | ask | show | jobs
by bryanlarsen 201 days ago
Of course you have to lock a mutex. You'd have to do that no matter the language, right?

And that's what I meant by verbose/ugly. Each of those steps is usually an if let / else error. None of those steps are hard, but you have to do them every time.

1 comments

Oh, plenty of people access shared state without proper locks all the time. Even experienced developers.
Heh. You're pedantically correct, the best kind. I meant "have to" in terms of "for correct operation you must" not "the compiler forces you to" since the latter isn't a thing in some languages.