Event loop for automatically processing events from libspotify.
>>> session = spotify.Session() >>> event_loop = spotify.EventLoop(session) >>> event_loop.start()
The event loop thread is a daemon thread, so it will not stop your application from exiting. If you wish to stop the event loop without stopping your entire application, call
stop(). You may call
join()to block until the event loop thread has finished, just like for any other thread.
If you use
EventLoopto process the libspotify events, any event listeners you’ve registered will be called from the event loop thread. pyspotify itself is thread safe, but you’ll need to ensure that you have proper synchronization in your own application code, as always when working with threads.
Start the event loop.
Stop the event loop.