Why is concurrent haskell non deterministic while parallel haskell primitives (par and pseq) deterministic?
问题 Don't quite understand determinism in the context of concurrency and parallelism in Haskell. Some examples would be helpful. Thanks 回答1: When dealing with pure values, the order of evaluation does not matter. That is essentially what parallelism does: Evaluating pure values in parallel. As opposed to pure values, order usually matters for actions with side-effects. Running actions simultaneously is called concurrency . As an example, consider the two actions putStr "foo" and putStr "bar" .