2015-11-07, 17:12
Hi, I have a little problem, I m making a download system in my addon, and I have a problem to stop it, I need to memorise the function class instance to call a fonction on it (to stop the process).
But everyTime a make a call to the class function I do
So I recreate a new class, and I can't acess to the first one
ATM I m using common pluggin cache to memorise a variable, but It s not terrible for performance because I need to check this variable at every loop (and common cache need disk acess too).
I have make a try with threading.enumerate(), the downoad is a thread so if I make a thread enumeration I can find the instance and use it but in fact, it's not working at all. I can see all the thread only in the first class call, not the next.
I can't get the working progressbarGB instance too, (in fact if I can close it, it will finish the process, but no way to close it)
I fact I m searching a way to call a script that work with thread, go away in other addon, and come back later to finish the running thread (and without using disk acess).
Anyone have a tips ?
But everyTime a make a call to the class function I do
Code:
Myclass a
a.fonction()
So I recreate a new class, and I can't acess to the first one
ATM I m using common pluggin cache to memorise a variable, but It s not terrible for performance because I need to check this variable at every loop (and common cache need disk acess too).
I have make a try with threading.enumerate(), the downoad is a thread so if I make a thread enumeration I can find the instance and use it but in fact, it's not working at all. I can see all the thread only in the first class call, not the next.
I can't get the working progressbarGB instance too, (in fact if I can close it, it will finish the process, but no way to close it)
I fact I m searching a way to call a script that work with thread, go away in other addon, and come back later to finish the running thread (and without using disk acess).
Anyone have a tips ?