public void doneOnSubTasksDone() {
		if (jp != null) return;
		synchronized (tasks) {
			jp = new JoinPoint<>();
			for (SubTask task : tasks) jp.addToJoinDoNotCancel(task.getProgress().getSynch());
		}
		jp.listenInline(new Runnable() {
			@Override
			public void run() {
				if (jp.hasError()) error(jp.getError());
				else done();
			}
		});
		jp.start();
	}
public void doneOnSubTasksDone ( ) { if ( jp != null ) return ; synchronized ( tasks ) { jp = new JoinPoint < > ( ) ; for ( SubTask task : tasks ) jp . addToJoinDoNotCancel ( task . getProgress ( ) . getSynch ( ) ) ; } jp . listenInline ( new Runnable ( ) { @ Override public void run ( ) { if ( jp . hasError ( ) ) error ( jp . getError ( ) ) ; else done ( ) ; } } ) ; jp . start ( ) ; }
Automatically call the done or error method of this WorkProgress once all current sub-tasks are done.