youngmonkeys / ezyfox

Java library supports for reflection, generic, annotations parsing, bean management and object binding

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ezyfox-concurrent]missing timeout checking on EzyFutureTask

tvd12 opened this issue · comments

class: java EzyFutureTask
function:

public <V> V get(long timeout) throws Exception {
		synchronized (this) {
			while(result == null && exception == null) {
				if(timeout > 0)
					wait(timeout);
				else 
					wait();
			}
			this.done = true;
			if(result != null)
				return (V)result;
			throw exception;
		}
	}

missing timeout checking