Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e48b6b9

Browse files
authored
Merge pull request #17618 from tacaswell/doc_event_loop
Doc event loop
2 parents 2348faa + 4fb5993 commit e48b6b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2316,7 +2316,7 @@ def start_event_loop(self, timeout=0):
23162316
The event loop blocks until a callback function triggers
23172317
`stop_event_loop`, or *timeout* is reached.
23182318
2319-
If *timeout* is negative, never timeout.
2319+
If *timeout* is 0 or negative, never timeout.
23202320
23212321
Only interactive backends need to reimplement this method and it relies
23222322
on `flush_events` being properly implemented.

lib/matplotlib/backends/backend_qt5.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def start_event_loop(self, timeout=0):
426426
if hasattr(self, "_event_loop") and self._event_loop.isRunning():
427427
raise RuntimeError("Event loop already running")
428428
self._event_loop = event_loop = QtCore.QEventLoop()
429-
if timeout:
429+
if timeout > 0:
430430
timer = QtCore.QTimer.singleShot(timeout * 1000, event_loop.quit)
431431
event_loop.exec_()
432432

0 commit comments

Comments
 (0)