Clears the #waiters list and returns the most recently added value.
()
| 834 | /** Clears the {@link #waiters} list and returns the most recently added value. */ |
| 835 | |
| 836 | private Waiter clearWaiters() { |
| 837 | Waiter head; |
| 838 | do { |
| 839 | head = waiters; |
| 840 | } while (!ATOMIC_HELPER.casWaiters(this, head, Waiter.TOMBSTONE)); |
| 841 | return head; |
| 842 | } |
| 843 | |
| 844 | /** Clears the {@link #listeners} list and returns the most recently added value. */ |
| 845 |