0

hello , i created a thread to process some work, then a scrolledpanel to display some notifications, but only the main thread can create such windows, so i tried some stuff like this :

#create thread
thread.join() #wait until thread finishes to display the scrolledpanel
display panel in main thread
.....
also
flag = 0
start thread
when thread finishes set flag to 1
in a while loop check for flag
then display panel
......

but in both cases, the main thread blocks (thats expected) but what i did not expect is for the progress window in the thread not to be displayed correctly, both methods seems to be a mess...so how can i do this in the right way, i need the thread, because the job can take some time and i do not want the main thread to block that long, is there something other than 'the join method' or the subthread to start the scrolledpanel some how in the main thread...any ideas? :-/

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Beat_Slayer
0

You can create semaphores and work with locks.

To me, if you tried all those possibilities. I think you just messing something.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.