[pysystray-users] Threads and "global variable"
Status: Beta
Brought to you by:
essiene
From: Christian K. <chr...@gm...> - 2006-09-14 15:53:49
|
Thank you Essien for this great tool! I am stuck at what seems like a simple thing: I have spawned one thread automatically on load of the taskbar icon. That was easy. Now I need this thread to change it's behaviour depending on what menu items I selected. I have a global variable that each menu item can set, but the thread doesn't see it. After what I could google on it it seems the threads run in their own space. I found some examples for communication between threads but only for class-threads and not the type function-thread that pysystray uses, plus it seems complicated. What is the most simplistic approach to change a parameter "globally" so that the thread can see it? I tried a get_val() function but that doesn't work either and the thread always sees 0. Cheers, Chris |