Skip to content

Produce useful exception when using ThreadPool #25

@pbourguignon

Description

@pbourguignon

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions