Closed
Description
I would like a way to say "run this other pyscript method without blocking execution of the current code path". Even better if this new method returns some kind of Future-like object that I can, later, get the result of, or cancel, or whatever. This method should take a pyscript method as an argument:
So I can, for instance do :
for value in range(4):
task.create_task(report_a)
def report_a():
task.unique('report_a')
task.sleep(10)
log.info('reporting a')
When running this, the log.info should only happen once and it should only sleep for 10-ish seconds.
Even better if I can pass arguments too: task.create_task(report_a, param1, param2, other="thing")
Metadata
Metadata
Assignees
Labels
No labels