I'm writing a scheduler which accepts a Runnable
which is either queued for synchronous or asynchronous execution.
I would like to be able to implement a SomeScheduler.interrupt(int taskId)
which causes a InterruptedException()
to be thrown from within the thread.
Is this possible or am I going about this all wrong?