How to safely share ArrayDeque between multiple threads?
<p>Recently I started reading 'Java 7 Concurrency Cookbook' and in a section <em>Creating and running a daemon thread</em> found the code where main thread creates and one instance of <code>ArrayDeque</code> and shares its reference with three producers and one consumer. The producers call <code>deque.addFirst(event)</code> and the consumer calls <code>deque.getLast()</code>. 
<p>But JavaDoc of <code>ArrayDeque</code> clearly states that: </p>

<blockquote>
  <p>Array deques are not thread-safe; in the absence of external synchronization, they do not support concurrent access by multiple threads.</p>
</blockquote>

<p>So I wonder whether it is a mistake or I just don't understand something?</p>