edu.emory.mathcs.backport.java.util.concurrent.helpers
Class ThreadHelpers
java.lang.Object
edu.emory.mathcs.backport.java.util.concurrent.helpers.ThreadHelpers
public class ThreadHelpers
extends java.lang.Object
Emulation of some new functionality present in java.lang.Thread in J2SE 5.0.
assignExceptionHandler
public static Runnable assignExceptionHandler(Runnable runnable,
ThreadHelpers.UncaughtExceptionHandler handler)
Returns wrapped runnable that ensures that if an exception occurs
during the execution, the specified exception handler is invoked.
runnable
- runnable for which exceptions are to be interceptedhandler
- the exception handler to call when exception occurs
during execution of the given runnable