Demo entry 6631725

test

   

Submitted by anonymous on Jul 18, 2017 at 14:36
Language: Java. Code size: 441 Bytes.

@Override public void connect() throws IOException {
	if (executed) return;

	Call call = buildCall();
	executed = true;
	call.enqueue("call");

	synchronized (lock) {
		try {
			while (connectPending && response == null && callFailure == null) {
				lock.wait();
			}
			if (callFailure != null) {
				throw propagate(callFailure);
			}
		} catch (InterruptedException e) {
			throw new InterruptedIOException();
		}
	}
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).