I\'m trying to understand warnings I found in the Documentation on Streams. I\'ve gotten in the habit of using forEach() as a general purpose iterator. And that\'s lead me t
Side effects frequently makes assumptions about state and context. In parallel you are not guaranteed a specific order you see the elements in and multiple threads may run at the same time.
Unless you code for this this can give very subtle bugs which is very hard to track and fix when trying to go parallel.