We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2edfb20 commit 49e1cceCopy full SHA for 49e1cce
lib/matplotlib/backends/qt_compat.py
@@ -228,6 +228,12 @@ def _maybe_allow_interrupt(qapp):
228
rsock.fileno(), _enum('QtCore.QSocketNotifier.Type').Read
229
)
230
231
+ # We do not actually care about this value other than running some
232
+ # Python code to ensure that the interpreter has a chance to handle the
233
+ # signal in Python land. We also need to drain the socket because it
234
+ # will be written to as part of the wakeup! There are some cases where
235
+ # this may fire too soon / more than once on Windows so we should be
236
+ # forgiving about reading an empty socket.
237
rsock.setblocking(False)
238
# Clear the socket to re-arm the notifier.
239
@sn.activated.connect
0 commit comments