def registerProducer(self, producer, streaming):
    self.producer = producer
    self.producerStreaming = streaming

    def _produce():
        d = self.producer.resumeProducing()
        d.addCallback((lambda x: self._reactor.callLater(0.1, _produce)))
    if (not streaming):
        self._reactor.callLater(0.0, _produce)
def registerProducer(self, producer, streaming):
    self.producer = producer
    self.producerStreaming = streaming

    def _produce():
        d = self.producer.resumeProducing()
        d.addCallback((lambda x: self._reactor.callLater(0.1, _produce)))
    if (not streaming):
        self._reactor.callLater(0.0, _produce)