Java ThreadPoolExecutor afterExecute() MethodThe afterExecute() method of ThreadPoolExecutor class is invoked after execution of the given Runnable. This method is invoked by the same thread that executed the task. SyntaxParametersr - the runnable that has completed t - the exception that caused termination, or null if execution completed normally Return valueNA ThrowRuntimeException. Example 1Test it NowOutput: In Runnable! Completed!! without any Exception Example 2Test it NowOutput: creating service a and b=4:0
Next TopicJava ThreadPoolExecutor
|