Skip to content

vine: future tasks and function calls cannot be mixed #4040

@btovar

Description

@btovar

Consider:

fs = []
    for i in range(3):
        f = executor.submit(executor.future_funcall("test-library", "my_double", i))
        fs.append(f)
    fl = executor.submit(executor.future_task(my_list, *fs))
    print(fl.result())

The expected output is: [0, 2, 3].

Instead we get:

[{'Result': 0, 'Success': True, 'Reason': None}, {'Result': 2, 'Success': True, 'Reason': None}, {'Result': 4, 'Success': True, 'Reason': None}]

For:

    fs = []
    for i in range(3):
        f = executor.submit(executor.future_task(my_double, i))
        fs.append(f)
    fl = executor.submit(executor.future_funcall("test-library", "my_list", *fs))
    print(fl.result())

we get the exception:

ndcctools.taskvine.task.FunctionCallNoResult

Metadata

Metadata

Labels

TaskVinebugFor modifications that fix a flaw in the code.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions