3 ms·
A program that use both mutable state and concurrency is nondeterministic: when run twice with the same input, it might produce completely different results (ba
by mbrubeck 17y ago
A program that use both mutable state and concurrency is nondeterministic: when run twice with the same input, it might produce completely different results (based on the order in which concurrent parts execute).
This is one reason that languages good for concurrency tend toward functional programming or other more-declarative paradigms. By eliminating observable state mutation, you can write concurrent programs that are still guaranteed to be deterministic.