Registered Member
|
I just started making a few plasmoids for myself. Could make most things work, except that it seems impossible to create a thread in applets.
Check the basic example below. I tried creating threads using thread, threading, QThread But all would crash the applet and python would say
So is it impossible to create a thread in plasmoids ? this program crashes 8/10 and works 2/10 times.
another example using qthread
the above program crashes 1/10 and works 9/10 and when it crashes, it says
is that a problem with the code, or the plasma ? Regards Silver Moon
KUBUNTU 18.04
|
Registered Member
|
Unsure within using Python, but developed a C++ plasma widget and been using QThread without issue in C++
Threading works well and was anyway required for me for UI performing long tasks (if not using service), else all of plasma engine would get stuck (like menu) if one plasma would sleep/wait on a task.. |
Registered Member
|
KUBUNTU 18.04
|
Administrator
|
It looks like an error in the Python code, either in the code itself, or in the binding. The crash is unrelated, because it's "simply" the deletion of a C++ object done by the Python GC when the error occurs.
"Violence is the last refuge of the incompetent."
Plasma FAQ maintainer - Plasma programming with Python |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]