title: Tear down method for twisted reactor?
body: <p>I'm writing a custom reactor for twisted and it needs some cleaning to do when it has to stop.
  I tried overriding the stop method like this:</p>
  
  <pre><code>def stop(self):
      posixbase.PosixReactorBase.stop(self)
      #cleanup code here
  </code></pre>
  
  <p>It does, however, seem to <strong>not</strong> always be called. When I run trial like this <code>python -m cProfile /usr/bin/trial -r custom tests/ | grep "stop"</code> the only <em>stop</em> methods that are called are:</p>
  
  <pre><code>    2    0.000    0.000    0.000    0.000 abstract.py:397(stopReading)
      1    0.000    0.000    0.000    0.000 abstract.py:405(stopWriting)
      1    0.000    0.000    0.000    0.000 log.py:691(stop)
      1    0.000    0.000    0.000    0.000 protocol.py:678(stopProtocol)
      3    0.000    0.000    0.000    0.000 reporter.py:97(stopTest)
      3    0.000    0.000    0.000    0.000 result.py:79(stopTest)
      1    0.000    0.000    0.000    0.000 udp.py:218(stopListening)
  </code></pre>