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

> Neither Go, Java or C++ would catch that concurrency bug.

That is incorrect. Java enforces that a monitor lock (or Lock) must be released by the same thread that acquired it. Attempting to unlock from a different thread throws IllegalMonitorStateException.



At runtime instead of compile time, which is the point of the thread.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: