Closed Fuyukai closed 7 years ago
Interesting What would you propose as an API for this? Is it enough to give the waiter object an add_task()
method of some kind?
Yes, that would be good.
Done. Use await w.add_task(task)
to add a task to existing "wait" object.
I have a set of tasks that are tracked(?) by a
curio.wait
object to check if they are finished. If the tasks crash, or if I need to add a new task to this list, I have no way of rebooting them and re-inserting them into the wait without cancelling all tasks and re-creating the wait, or using the internal private API.It'd be nice if there was a way to insert a new task into a waiter without having to re-create it.