'Write the counter value once.'

def resumeProducing(self):

    if ((self.consumer is None) or (self.counter >= 10)):
        raise RuntimeError('BUG:    resume    after    unregister/stop.')
    else:
        self.consumer.write(intToBytes(self.counter))
        self.counter += 1
        if (self.counter == 10):
            self.consumer.unregisterProducer()
            self._done()
