Java Locks Cause Race Conditions
threading in java again I spent over an hour debugging a race condition because java locks don't work like regular locks. If the lock got locked by your current thread, lock.lock() doesn't block. I HAVE to do that though because I delete a resource from this thread (locking the lock so the thread has to wait for the resource to be set again) and set the resource from another thread (unlocking the lock so all threads that want the resource can get it) FUCK JAVA, holy shit
A programming screenshot explains the frustration of debugging a Java race condition caused by thread locks behaving differently from ordinary locks. The punchline is the exaggerated outburst “FUCK JAVA, holy shit,” used as a reaction to maddening concurrency bugs.
- @dev_meme / 5109 2023-02-25
- Type
- image
- Size
- 800×526 · 59.2 KiB
- Mood
- frustrated, angry
- Language
- en
- Added