public Promise getNext ( ) { while ( ! lock . compareAndSet ( false , true ) ) { } try { if ( nextFuture == null ) return new Promise ( ) ; else return ( Promise ) nextFuture ; } finally { lock . set ( false ) ; } }
special method for tricky things . Creates a nextFuture or returns it . current