title: Is StringBuilder threadsafe (using it with parallelStream)?
body: <p>My code:</p>
  
  <pre><code>StringBuilder sb = new StringBuilder();
  
  events.parallelStream().forEach(event -&gt; {
      sb.append(event.toString());
      sb.append("\n");
  });
  </code></pre>
  
  <p>I don't care about the order of the <code>events.toString()</code> in the final result. But I care that the <code>events.toString()</code> will correctly appear one line after another, without mixing / messing up of course.</p>
  
  <p>Is <code>parallelStream</code> (instead of <code>stream</code>) safe in this regard?</p>