Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute action when all threads in except main are finished? (Python)

I use wxpython for GUI. In main thread I fired some threads in background and showed modal dialog in main thread immediately. Now I want this modal dialog to be updated with some info at the moment all background threads finish they job. What's the best way to do this?

like image 748
speeddemonmj Avatar asked Jun 04 '26 07:06

speeddemonmj


1 Answers

Pass a Queue as an argument to the threads, and let them put() a done / result object into that. Then count them.

like image 103
pyroscope Avatar answered Jun 08 '26 01:06

pyroscope



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!