code: public final T blockResult(long timeout) throws TError, CancelException {
  		Thread t;
  		BlockedThreadHandler blockedHandler;
  		synchronized (this) {
  			if (unblocked && listenersInline == null) {
  				if (error != null) throw error;
  				if (cancel != null) throw cancel;
  				return result;
  			}
  			t = Thread.currentThread();
  			blockedHandler = Threading.getBlockedThreadHandler(t);
  			if (blockedHandler == null)
  				while (!unblocked || listenersInline != null)
  					try { this.wait(timeout < 0 ? 0 : timeout); }
  					catch (InterruptedException e) { return null; }
  		}
  		if (blockedHandler != null)
  			blockedHandler.blocked(this, timeout);
  		if (error != null) throw error;
  		if (cancel != null) throw cancel;
  		return result;
  	}
docs: Block until this AsyncWork is unblocked or the given timeout expired,
  and return the result in case of success, or throw the error or cancellation.
  @param timeout in milliseconds. 0 or negative value means infinite.