'Resume producing integers.
This tells the push producer to (re-)add itself to the main loop and
produce integers for its consumer until the requested number of integers
were returned to the client.'

def resumeProducing(self):

    self._paused = False
    while ((not self._paused) and (self._produced < self._goal)):
        next_int = randrange(0, 10000)
        self._proto.sendLine(('%d' % next_int))
        self._produced += 1
    if (self._produced == self._goal):
        self._proto.transport.unregisterProducer()
        self._proto.transport.loseConnection()
