Start running the given iterator as a long-running cooperative task, by calling next() on it as a periodic timed event.

This is very useful if you have computationally expensive tasks that you want to run without blocking the reactor. Just break each task up so that it yields frequently, pass it in here and the global Cooperator will make sure work is distributed between them without blocking longer than a single iteration of a single task.

Parametersiteratorthe iterator to invoke.
Returnsa CooperativeTask object representing this task.
API Documentation for Twisted, generated by pydoctor at 2020-03-20 23:54:06.