Skip to content

Commit d91fa3a

Browse files
QuLogictacaswell
authored andcommitted
Merge pull request #17618 from tacaswell/doc_event_loop
Doc event loop
1 parent bbd3cf6 commit d91fa3a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/matplotlib/backend_bases.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2293,7 +2293,7 @@ def start_event_loop(self, timeout=0):
22932293
The event loop blocks until a callback function triggers
22942294
`stop_event_loop`, or *timeout* is reached.
22952295
2296-
If *timeout* is negative, never timeout.
2296+
If *timeout* is 0 or negative, never timeout.
22972297
22982298
Only interactive backends need to reimplement this method and it relies
22992299
on `flush_events` being properly implemented.

lib/matplotlib/backends/backend_qt5.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def start_event_loop(self, timeout=0):
451451
if hasattr(self, "_event_loop") and self._event_loop.isRunning():
452452
raise RuntimeError("Event loop already running")
453453
self._event_loop = event_loop = QtCore.QEventLoop()
454-
if timeout:
454+
if timeout > 0:
455455
timer = QtCore.QTimer.singleShot(timeout * 1000, event_loop.quit)
456456
event_loop.exec_()
457457

0 commit comments

Comments
 (0)