Skip to content

Can not timeout a session properly #38

Open
@vitrun

Description

@vitrun

To reproduce:

session = WolframLanguageSession()

expr = "Pause[10]"
session.evaluate(f"{expr}", timeout=1)
session.stop()

The culprit might be:

def evaluate_wrap(self, expr, **kwargs):
return self.evaluate_wrap_future(expr, **kwargs).result()

A potential fix:

return self.evaluate_wrap_future(expr, **kwargs).result(timeout=kwargs.get('timeout'))

Which, however, introduces another issue where the session cannot be terminated, as the lock is not released, requiring a manual interruption (CTRL-C).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions