On segunda-feira, 19 de novembro de 2012 14.03.17, Konstantin Tokarev wrote: > > - The core of a concurrency engine should be a work-stealing data > > structure/scheduler. Qt Concurrent has simple work-stealing > > functionality, but is to tied to the global thread pool. > Since number of available CPU cores is usually constant over process > lifetime (let's forget HPC clusters :), there's nothing wrong with global > thread pool.
By that, you immediately restrict QtConcurrent's use to CPU-bound tasks. One can't use it anymore for tasks that involve blocking I/O, for example. Let me give you an example of a thread pool used differently: the DNS resolver code in QtNetwork. It uses 5 threads, regardless of how many CPU cores you have. It involves a blocking call. And as such, it must not use the global thread pool because it would prevent other tasks from running. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
