2017-06-19, 14:38
@CaffeinatedMike
In the standard CPython implementation Thread.daemon property controls if a child thread will outlive its parent. But in Kodi this flag does not work and the thread will continue to run, unless stopped.
No, it is not. The target parameter of Thread constructor expects a callable function object, and a class instance is not a such object (unless a class explicitly implements __call__ method which is not the case here). Please look into some Python threading tutorials available in the Internet.
Quote:Thanks for that information Roman, I hadn't known that children would outlive the master.
In the standard CPython implementation Thread.daemon property controls if a child thread will outlive its parent. But in Kodi this flag does not work and the thread will continue to run, unless stopped.
Quote:Is this correctly implemented?
No, it is not. The target parameter of Thread constructor expects a callable function object, and a class instance is not a such object (unless a class explicitly implements __call__ method which is not the case here). Please look into some Python threading tutorials available in the Internet.