Opened 10 years ago

Last modified 7 years ago

#4744 defect new

Glib2 and Gtk2 reactor don't always report writeable events on Windows

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: core Keywords: windows, gtk
Cc: Branch:


twisted.internet.test.test_tcp.TCPClientTestsBuilder.test_disconnectWhileProducing fails on Windows for these two reactors, apparently because while we are asking the g* io system to tell us about writeability, it never does.

This seems like it's probably a bug in glib or gobject or gtk or pygobject or pygtk.

Change History (2)

comment:1 Changed 10 years ago by <automation>

Owner: Glyph deleted

comment:2 Changed 7 years ago by schlamar

This is probably because you can only register a fd once with gobject.io_add_watch on Windows:

As a workaround you can de- and re-register the fd for any add_reader and add_writer and do the READ/WRITE multiplexing on your own. As reference you can have a look at my Tornado IOLoop implementation: Note that Tornado already does the multiplexing on its own (there is always just one _handle_events callback per fd), so a Twisted implementation should be more complex.

Note: See TracTickets for help on using tickets.