public class SafeExecutorService
An executor that can be wrapped around others and will check to be sure that
any execute calls are not made from a thread that is managed by this executor
service. this can prevent a fairly nasty and stupid deadlock occurence.
SafeExecutorService ses = new SafeExecutorService(false);
SafeExecutorThreadFactory setf = new SafeExecutorThreadFactory(ses, Executors.defaultThreadFactory());