2
from twisted.application.service import Service
3
from twisted.internet.task import SchedulerStopped, Cooperator, coiterate
5
def iterateInReactor(i, delay=None):
7
Cooperatively iterate over the given iterator.
9
@see: L{twisted.internet.task.coiterate}.
14
class SchedulingService(Service):
16
Simple L{IService} implementation.
19
self.coop = Cooperator(started=False)
21
def addIterator(self, iterator):
22
return self.coop.coiterate(iterator)
24
def startService(self):
27
def stopService(self):
31
'SchedulerStopped', 'Cooperator',
32
'SchedulingService', 'iterateInReactor']