@Override public void addFinal(Object notificationLite) { Node<Object> n = new Node<Object>(notificationLite); Node<Object> t = tail; tail = n; size++; t.lazySet(n); // releases both the tail and size trimHead(); done = true; }
@Override public void addFinal(Object notificationLite) { Node<Object> n = new Node<Object>(notificationLite); Node<Object> t = tail; tail = n; size++; t.lazySet(n); // releases both the tail and size trimHead(); done = true; }