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

Produce useful exception when using ThreadPool #25

Open
pbourguignon opened this issue Feb 14, 2020 · 0 comments
Open

Produce useful exception when using ThreadPool #25

pbourguignon opened this issue Feb 14, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@pbourguignon
Copy link
Contributor

If the evaluation of an Op instance raises an exception, the associated context is of little use to identify the root cause of the issue.

This issue could be easily solved in single-threaded mode, where the call stack allows to catch the underlying exception in the body of paragraph.session.evaluate. When a ThreadPool is used, the exception is actually raised when the value of the Future is accessed, at which point the call stack does not allow to catch it at a place where the relevant context is available.

The solution consists in refactoring the flow of the submission to the ThreadPool in a way that the value of the futures are collected within the body of paragraph.session.evaluate.

@pbourguignon pbourguignon added the enhancement New feature or request label Feb 14, 2020
@pbourguignon pbourguignon self-assigned this Feb 14, 2020
@pbourguignon pbourguignon added this to the Version 1.3.0 milestone Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant