In tulip, if I have a tcp  connection to a server
(asyncio.streams.open_connection), it is not trivial to ensure that all
data was written before closing the application.

If I simply call close() on either the StreamWriter or Transport, it
basically does nothing.  Data will continue to be written in the
background, which means that if I exit from the Python script immediately I
risk not having all data written to the socket.

>From what I can tell, I have to close() the StreamWriter, then read from
the StreamReader until I get an empty string (EOF).  Am I understanding
this correctly?

I wish this sort of thing were a bit more intuitive in a future revision of
tulip.  A synchronous close() would be helpful, I think.

-- 
Gustavo J. A. M. Carneiro
Gambit Research LLC
"The universe is always one step beyond logic." -- Frank Herbert

Reply via email to