8000 DOC: Change text start/stop_event_loop docstrings · matplotlib/matplotlib@e1484e2 · GitHub
[go: up one dir, main page]

Skip to content

Commit e1484e2

Browse files
tacaswellanntzer
authored andcommitted
DOC: Change text start/stop_event_loop docstrings
1 parent 95dc08f commit e1484e2

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2428,21 +2428,24 @@ def new_timer(self, *args, **kwargs):
24282428
def flush_events(self):
24292429
"""Flush the GUI events for the figure.
24302430
2431-
GUI backends likely need to reimplement this method.
2431+
Interactive backends need to reimplement this method.
24322432
"""
24332433

24342434
def start_event_loop(self, timeout=0):
24352435
"""Start a blocking event loop.
24362436
2437-
Such an event loop is used by interactive functions, such as ginput and
2438-
waitforbuttonpress, to wait for events. This should not be confused
2439-
with the main GUI event loop, which is independent and always running.
2437+
Such an event loop is used by interactive functions, such as `ginput`
2438+
and `waitforbuttonpress`, to wait for events.
24402439
24412440
The event loop blocks until a callback function triggers
2442-
`stop_event_loop`, or *timeout* is reached. If *timeout* is negative,
2443-
never timeout.
2441+
`stop_event_loop`, or *timeout* is reached.
24442442
2445-
Only GUI backends need to reimplement this method.
2443+
If *timeout* is negative, never timeout.
2444+
2445+
Only interactive backends need to reimplement this method and it relies
2446+
on `flush_events` being properly implemented.
2447+
2448+
Interactive backends should implement this in a more native way.
24462449
"""
24472450
if timeout <= 0:
24482451
timeout = np.inf
@@ -2457,7 +2460,8 @@ def start_event_loop(self, timeout=0):
24572460
def stop_event_loop(self):
24582461
"""Stop the current blocking event loop.
24592462
2460-
Only GUI backends need to reimplement this method.
2463+
Interactive backends need to reimplement this to match
2464+
`start_event_loop`
24612465
"""
24622466
self._looping = False
24632467

0 commit comments

Comments
 (0)
0