Hacker News new | ask | show | jobs
by shawnz 19 days ago
Your entire codebase is already at risk of being blocked by a spinlock or CPU-intensive operation, so what's the difference?
1 comments

If you haven’t taken a lock, any other code can start executing at any time, so any invariant you might have established on one line may no longer be true on the next line.

If you don’t depend on anything mutable that anyone else can modify then this is mitigated, but that’s a very specific discipline you have to abide by.