If we make a Joblet a Callable and add a wrapper to turn a Callable into a Joblet, then we can take code that was previously being submitted to an ExecutorService and just turn it trivially into a Joblet.
This will require a change of the interface to use a call method. Alternatively, if we want a more gradual change, we could just as well make it a Runnable and force thrown exceptions to be RuntimeExceptions. However, if we want to support catching a more diverse variety of errors we could just as well make it identical to Callable#call .
If we make a
JobletaCallableand add a wrapper to turn aCallableinto aJoblet, then we can take code that was previously being submitted to anExecutorServiceand just turn it trivially into aJoblet.This will require a change of the interface to use a
callmethod. Alternatively, if we want a more gradual change, we could just as well make it aRunnableand force thrown exceptions to beRuntimeExceptions. However, if we want to support catching a more diverse variety of errors we could just as well make it identical toCallable#call.