@Override void putNext(Waiter waiter, Waiter newValue) { waiterNextUpdater.lazySet(waiter, newValue); }
@Override void putThread(Waiter waiter, Thread newValue) { waiterThreadUpdater.lazySet(waiter, newValue); }
final void setNext(final MpscLinkedQueueNode<T> newNext) { // Similar to 'next = newNext', but slightly faster (storestore vs loadstore) // See: http://robsjava.blogspot.com/2013/06/a-faster-volatile.html nextUpdater.lazySet(this, newNext); }
@Override void putThread(Waiter waiter, Thread newValue) { waiterThreadUpdater.lazySet(waiter, newValue); }
@Override void putNext(Waiter waiter, Waiter newValue) { waiterNextUpdater.lazySet(waiter, newValue); }
protected final void lazySetHeadRef(MpscLinkedQueueNode<E> headRef) { UPDATER.lazySet(this, headRef); } }
@Override void putNext(Waiter waiter, Waiter newValue) { waiterNextUpdater.lazySet(waiter, newValue); }
@Override void putThread(Waiter waiter, Thread newValue) { waiterThreadUpdater.lazySet(waiter, newValue); }
@SuppressWarnings("unchecked") PublishSubscriber(int prefetch, FluxPublish<T> parent) { this.prefetch = prefetch; this.parent = parent; SUBSCRIBERS.lazySet(this, EMPTY); }
EmitterProcessor(boolean autoCancel, int prefetch) { if (prefetch < 1) { throw new IllegalArgumentException("bufferSize must be strictly positive, " + "was: " + prefetch); } this.autoCancel = autoCancel; this.prefetch = prefetch; SUBSCRIBERS.lazySet(this, EMPTY); }
@SuppressWarnings("unchecked") FluxPublishMulticaster(int prefetch, Supplier<? extends Queue<T>> queueSupplier, Context ctx) { this.prefetch = prefetch; this.limit = Operators.unboundedOrLimit(prefetch); this.queueSupplier = queueSupplier; SUBSCRIBERS.lazySet(this, EMPTY); this.context = ctx; }
@Override public void run() { THREAD.lazySet(this, Thread.currentThread()); source.subscribe(this); }
@Override public void run() { THREAD.lazySet(this, Thread.currentThread()); parent.subscribe(this); }
@Override public void onError(Throwable t) { SUBSCRIPTION.lazySet(this, Operators.cancelledSubscription()); parent.boundaryError(this, t); }
public MpscLinkedQueue() { LinkedQueueNode<E> node = new LinkedQueueNode<>(); CONSUMER_NODE_UPDATER.lazySet(this, node); PRODUCER_NODE_UPDATER.getAndSet(this, node);// this ensures correct construction: // StoreLoad }
void init(int n) { ScheduledExecutorService[] a = new ScheduledExecutorService[n]; for (int i = 0; i < n; i++) { a[i] = Schedulers.decorateExecutorService(this, this.get()); } EXECUTORS.lazySet(this, a); }
@Override public void onComplete() { SUBSCRIPTION.lazySet(this, Operators.cancelledSubscription()); parent.openComplete(this); }
@Override public void onComplete() { actual.onComplete(); worker.dispose(); THREAD.lazySet(this,null); }
@Override public void onNext(Object t) { Subscription s = subscription; if (s != Operators.cancelledSubscription()) { SUBSCRIPTION.lazySet(this, Operators.cancelledSubscription()); s.cancel(); parent.close(this, index); } }
@Override public void onError(Throwable t) { if (subscription != Operators.cancelledSubscription()) { SUBSCRIPTION.lazySet(this, Operators.cancelledSubscription()); parent.boundaryError(this, t); } else { Operators.onErrorDropped(t, parent.ctx); } }