Thanks Matt, >>create a work queue and limit the number of threads that ever exist concurrently. that is exactly my goal.
Cheers, frank On 17/12/13 08:48, Matthew Woehlke wrote: > On 2013-12-16 14:32, Frank Rueter | OHUfx wrote: >> will wait() block concurrent threads? > wait() blocks the thread from which it is called until the thread on > which it is called terminates. Generally you should be calling this when > the application is about to exit, or e.g. when you've instructed the > thread to exit and it is not expected to hang around much longer (or has > already exited). > >> In my case my app will receive an arbitrary amount of tasks and I need >> to figure out how many of those tasks I want to run at the same time. > That sounds like a job for QThreadPool and/or QtConcurrent. I would try > to avoid actually creating a large number of threads, as they consume > system resources, and instead create a work queue and limit the number > of threads that ever exist concurrently. (QtConcurrent basically does > that for you, automatically. I haven't worked with QThreadPool but I > believe it is similar; in fact I believe it is used to implement > QtConcurrent.) > _______________________________________________ PySide mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/pyside
