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

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

Open
btovar opened this issue Jan 27, 2025 · 0 comments
Open

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

btovar opened this issue Jan 27, 2025 · 0 comments
Assignees
Labels
bug For modifications that fix a flaw in the code. TaskVine

Comments

@btovar
Copy link
Member

btovar commented Jan 27, 2025

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
@btovar btovar added bug For modifications that fix a flaw in the code. TaskVine labels Jan 27, 2025
@btovar btovar assigned BarrySlyDelgado and unassigned btovar Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For modifications that fix a flaw in the code. TaskVine
Projects
None yet
Development

No branches or pull requests

2 participants