summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2016-11-23 10:20:49 +0100
committerjaseg <git@jaseg.net>2016-11-23 10:20:49 +0100
commiteb8b6a05d75a5abb55205f9859ce6f4223735946 (patch)
treed3e7605b3fce84ba332136fc5e930ff905916ca5 /README.md
parentefbf182723299e7edfe70dfd8b536419628fbc2a (diff)
downloadpython-mpv-eb8b6a05d75a5abb55205f9859ce6f4223735946.tar.gz
python-mpv-eb8b6a05d75a5abb55205f9859ce6f4223735946.tar.bz2
python-mpv-eb8b6a05d75a5abb55205f9859ce6f4223735946.zip
Clarify event thread handling in the README
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md
index b02111f..1468ce4 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,14 @@ player = mpv.MPV(ytdl=True)
player.play('https://youtu.be/DOmdB7D-pUU')
```
+Threading
+---------
+The ```mpv``` module starts one thread for event handling, since MPV sends events that must be processed quickly. The event queue has a fixed maxmimum size and some operations can cause a large number of events to be sent.
+
+If you want to handle threading yourself, you can pass ```start_event_thread=False``` to the ```MPV``` constructor and manually call the ```MPV``` object's ```_loop``` function. There is also an out-of-date branch on the repo that you can cherry-pick that brings in asyncio.
+
+All API functions are thread-safe. If one is not, please file an issue on github.
+
Advanced Usage
==============
```python