This thread is a followup of an issue I began discussing on a github pull request:
On an addon I'm working on (Spotimc), freezes XBMC for a while when playback is requested, leading to timeout errors on the end.
The issue happens when playback is requested from python to a resource served by an embedded http server (CherryPy for example), started on the same process space as XBMC.
In short, the following chain of events should explain what's going on behind the scenes:
- Playback is requested from python to an url of the embedded server.
- XBMC opens an http connection to the embedded server.
- On another python thread the server should handle the request, but it can't since the python GIL is still owned by (1). As a result the requests always time out.
I've created a simple addon which should help to reproduce the issue easily. It just starts a python server, and pressing the play button tells XBMC to start playing a file served by this server. In the presence of the issue XBMC should freeze for a while like it does with Spotimc. The addon can be downloaded here:
Hope all this info turns useful to resolve the issue.
Thanks in advance.