Skip to content

[feat]is there a plan to support generator? #3

@liunux4odoo

Description

@liunux4odoo
  • Executor version: 0.2.5
  • Python version: 3.10
  • Operating System: win10

Description

Running generator as job raises pickle error.

What I Did

from executor.engine import Engine, ProcessJob


def f():
    import time
    for i in range(3):
        time.sleep(1)
        yield i


with Engine() as engine:
    job = ProcessJob(f)
    engine.submit(job)
    engine.wait()
    print(job.result())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions