Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The rule for mutexes is, never take more than one. As long as you only ever take one, life is pretty good.

Is there any shortcoming you can't apply that to? Don't malloc unless you free. If you cast in your program, make sure to cast to the correct type.

> The story of software engineering in the 1990s was a story of overreactions and misdiagnoses. This was one of them.

The problem of multiple mutexes was diagnosed well before the 90s. "Dining philosophers" was formulated in 1965.

    https://www.adit.io/posts/2013-05-11-The-Dining-Philosophers-Problem-With-Ron-Swanson.html

    https://www.adit.io/posts/2013-05-15-Locks,-Actors,-And-STM-In-Pictures.html


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: