160 |
|
monitor <i>happens-before</i> every subsequent lock (<tt>synchronized</tt> |
161 |
|
block or method entry) of that same monitor. And because |
162 |
|
the <i>happens-before</i> relation is transitive, all actions |
163 |
< |
of a thread prior to unlocking happen before all actions |
163 |
> |
of a thread prior to unlocking <i>happen-before</i> all actions |
164 |
|
subsequent to any thread locking that monitor. |
165 |
|
|
166 |
|
<li>A write to a <tt>volatile</tt> field <i>happens-before</i> every |
185 |
|
<ul> |
186 |
|
|
187 |
|
<li>State changes to any object made prior to placement into any |
188 |
< |
concurrent collection happen before this element is accessed via or |
188 |
> |
concurrent collection <i>happen-before</i> this element is accessed via or |
189 |
|
removed from that collection. |
190 |
|
|
191 |
< |
<li>State changes to a <tt>Runnable</tt> object made prior to |
192 |
< |
submission to an <tt>Executor</tt> <i>happen-before</i> its execution. And |
193 |
< |
similarly for a <tt>Callable</tt> object submitted to an |
194 |
< |
<tt>ExecutorService</tt>. |
191 |
> |
<li>State changes to a <tt>Runnable</tt> object made by the |
192 |
> |
submitting thread prior to submission to an <tt>Executor</tt> |
193 |
> |
<i>happen-before</i> its execution. Similarly, state changes to a |
194 |
> |
<tt>Callable</tt> object made by the submitting thread before being |
195 |
> |
submitted to an <tt>ExecutorService</tt> <i>happen-before</i> its |
196 |
> |
execution. |
197 |
|
|
198 |
|
<li>State changes to a <tt>Future</tt> made prior to it becoming |
199 |
|
available <i>happen-before</i> access via <tt>Future.get()</tt>. |
202 |
|
<tt>Lock.unlock</tt>, <tt>Semaphore.release</tt>, |
203 |
|
<tt>CountDownLatch.countDown</tt> and <tt>Condition.signal</tt> |
204 |
|
<i>happen-before</i> actions subsequent to a successful "acquiring" method such as |
205 |
< |
<tt>Lock.lock</tt>, <tt>Semaphore.acquire</tt>, and |
206 |
< |
<tt>CountDownLatch.await</tt> on the same synchronizer object. |
205 |
> |
<tt>Lock.lock</tt>, <tt>Semaphore.acquire</tt>, <tt>Condition.await</tt>, and |
206 |
> |
<tt>CountDownLatch.await</tt> on the same synchronizer object. |
207 |
|
|
208 |
< |
<li>Actions prior to calling <tt>Exchanger.exchange</tt> |
209 |
< |
<i>happen-before</i> those subsequent to the matching actions in |
210 |
< |
other threads. |
208 |
> |
<li>For each pair of threads that successfully exchange objects via |
209 |
> |
an <tt>Exchanger</tt>, actions prior to to the <tt>exchange()</tt> |
210 |
> |
in each thread <i>happen-before</i> those subsequent to the |
211 |
> |
corresponding <tt>exchange()</tt> in the other thread. |
212 |
|
|
213 |
|
<li>Actions prior to calling <tt>CyclicBarrier.await</tt> |
214 |
|
<i>happen-before</i> actions performed by the barrier action, and |
215 |
|
actions performed by the barrier action <i>happen-before</i> actions |
216 |
< |
subsequent to the return from <tt>await</tt> in other threads. |
216 |
> |
subsequent to a successful return from the corresponding <tt>await</tt> |
217 |
> |
in other threads. |
218 |
|
|
219 |
|
</ul> |
220 |
|
|