4 ms·
Your entire codebase is already at risk of being blocked by a spinlock or CPU-intensive operation, so what's the difference?
by shawnz 4mo ago
Your entire codebase is already at risk of being blocked by a spinlock or CPU-intensive operation, so what's the difference?
- dullcrisp 4mo agoIf 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.