code: @Override
  	public Promise<T> take() {
  		assert take == null;
  		if (exception == null) {
  			if (put != null && willBeExhausted()) {
  				assert !isEmpty();
  				T item = doPoll();
  				SettablePromise<Void> put = this.put;
  				this.put = null;
  				put.set(null);
  				return Promise.of(item);
  			}
  
  			if (!isEmpty()) {
  				return Promise.of(doPoll());
  			}
  
  			take = new SettablePromise<>();
  			return take;
  		} else {
  			return Promise.ofException(exception);
  		}
  	}
docs: Returns a promise of the {@code head} index of
  the {@code buffer} if it is not empty.
  <p>
  If this buffer will be exhausted after this
  take and {@code put} promise is not {@code null},
  {@code put} will be set {@code null} after the poll.
  <p>
  Current {@code take} must be {@code null}. If
  current {@code exception} is not {@code null},
  a promise of this exception will be returned.
  
  @return promise of element taken from the buffer