4 ms·
>One operation can't corrupt another operation's view of state because state is immutable by default. How true is this in practice? I mean on the one hand sur
by stonemetal12 11mo ago
>One operation can't corrupt another operation's view of state because state is immutable by default.
How true is this in practice? I mean on the one hand sure Operation 2 doesn't seem some half modified state from Operation 1. On the other hand Operation 2 now has some stale state and makes the wrong decisions does the wrong thing because it didn't see Operation 1's changes.
- jinwoo68 11mo agoThat happens whether immutable or not. In the mutable world, you have to guard that using a mutex or something. In that case, operation 1 may be blocked by operation 2, and now you get a "stale" state from operation 2. But that's okay. You'll get a new state next time. The real problem occurs when two states are mixed and corrupted.