Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Joblet a Callable/Runnable #2

Open
roshan opened this issue Dec 15, 2016 · 1 comment
Open

Make Joblet a Callable/Runnable #2

roshan opened this issue Dec 15, 2016 · 1 comment

Comments

@roshan
Copy link
Contributor

roshan commented Dec 15, 2016

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 .

@roshan
Copy link
Contributor Author

roshan commented Feb 26, 2018

@armaansarkar an alternative is to have code branch on instanceof Runnable and instanceof Callable. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant