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