On 03:59 am, rut...@osu.edu wrote:
>Hi twisted community,
>
>What’s the best way to ensure writes to stdout via stdio.StandardIO
>are completed before we shutdown the reactor?   The use case is to
>emit an error message before we shutdown the reactor and stop our
>program.  Dummy code snippet:

If you call the transport's loseConnection method, then the protocol's 
connectionLost method will be called after the output buffer is 
completely written.

Jean-Paul

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to