Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Simplify rearming wakup socket
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
  • Loading branch information
tacaswell and QuLogic authored Aug 21, 2021
commit c3772ae037c5a2c7614013a9c36954675c5d9de0
6 changes: 2 additions & 4 deletions lib/matplotlib/backends/qt_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,8 @@ def _maybe_allow_interrupt(qapp):
rsock.fileno(), _enum('QtCore.QSocketNotifier.Type').Read
)

@sn.activated.connect
def on_signal(*args):
rsock.recv(
sys.getsizeof(int)) # clear the socket to re-arm the notifier
# Clear the socket to re-arm the notifier.
sn.activated.connect(lambda *args: rsock.recv(1))

def handle(*args):
nonlocal handler_args
Expand Down