diff options
author | jaseg <git@jaseg.net> | 2016-11-23 10:20:49 +0100 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2016-11-23 10:20:49 +0100 |
commit | eb8b6a05d75a5abb55205f9859ce6f4223735946 (patch) | |
tree | d3e7605b3fce84ba332136fc5e930ff905916ca5 /README.md | |
parent | efbf182723299e7edfe70dfd8b536419628fbc2a (diff) | |
download | python-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.md | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |