lib/src/main/java/fr/coppernic/framework/art/AsyncExecutorService.java
/**
	 * Called by a task when this one has done.
	 * <p> We don't know the thread from which this method is called
	 *
	 * @param param result of the task
	 */
Called by a task when this one has done.
 We don't know the thread from which this method is called

@param param result of the task
Called by a task when this one has done . We don ' t know the thread from which this method is called @param param result of the task
@Override
	public synchronized void onDone(AsyncRunnable<V> task, V param) {
		logd("onDone");
		if (current == null) {
			logd("Current is null - task was cancelled");
		} else if (task != current) {
			throw new RuntimeException(new InvalidObjectException(task + " should be " + current));
		} else {
			logd("State is " + mState.get());
			listener.afterTask((T) task, param);
			switch (mState.get()) {
				case IDLE:
					break;
				case RUNNING:
					continueTask();
					break;
				case PAUSING:
					mState.set(State.PENDING);
					listener.onPaused();
					break;
				case PENDING:
					listener.onPaused();
					break;
				case DONE:
					break;
				case CANCELLED:
					onCancel(task, param);
					break;
			}
		}
	}
@ Override public synchronized void onDone ( AsyncRunnable < V > task , V param ) { logd ( "onDone" ) ; if ( current == null ) { logd ( "Current is null - task was cancelled" ) ; } else if ( task != current ) { throw new RuntimeException ( new InvalidObjectException ( task + " should be " + current ) ) ; } else { logd ( "State is " + mState . get ( ) ) ; listener . afterTask ( ( T ) task , param ) ; switch ( mState . get ( ) ) { case IDLE : break ; case RUNNING : continueTask ( ) ; break ; case PAUSING : mState . set ( State . PENDING ) ; listener . onPaused ( ) ; break ; case PENDING : listener . onPaused ( ) ; break ; case DONE : break ; case CANCELLED : onCancel ( task , param ) ; break ; } } }
Called by a task when this one has done.
Called by a task when this one has done .
//Task was cancelled, nothing to do // hook //noinspection unchecked //no op //no op //no op