2017-12-01, 16:15
I have written a Python script that uses threads (as daemons), and I'd like to use the AbortRequested signal to clean those threads up when Kodi exits. Replacing my threads' while loop with
Can someone explain to me how I am misusing this? I had expected a False return until Kodi exits, and had intended to use the return as a basis for tearing down the threads. There is no critical state information at play here, so there's nothing to save...but I'd like to clean things up and allow Kodi to exit as it should in a timely manner.
The script in question
The result of the script
I'm quite certain that people that know how to code in Python will find the above script in many ways offensive. I've learned just enough Python to get this working, and intend to convert it to an addon as my understanding of how to do that improves, so if you'd like to provide feedback (shy of 'please, step away from the keyboard') I am certainly interested in your feedback.
TLDR; Why would xbmc.abortRequested return True when Kodi is in operation?
causes it to exit immediately. Checking the state of AbortRequested withpython:while(not xbmc.abortRequested)
returnspython:print '\n\t KODI says that AbortRequested is: ' + str(xbmc.abortRequested)
python:07:41:42.262 T:9028 DEBUG: KODI says that AbortRequested is: True
Can someone explain to me how I am misusing this? I had expected a False return until Kodi exits, and had intended to use the return as a basis for tearing down the threads. There is no critical state information at play here, so there's nothing to save...but I'd like to clean things up and allow Kodi to exit as it should in a timely manner.
The script in question
The result of the script
I'm quite certain that people that know how to code in Python will find the above script in many ways offensive. I've learned just enough Python to get this working, and intend to convert it to an addon as my understanding of how to do that improves, so if you'd like to provide feedback (shy of 'please, step away from the keyboard') I am certainly interested in your feedback.
TLDR; Why would xbmc.abortRequested return True when Kodi is in operation?