How to set thread priority for QtConcurrent::map
Hi,
My machine is a single core with QThread::idealThreadCount() = 1
I made 2 QtConcurrent::map calls. The problem is that the 2nd one doesn't start until the 1st one finished. What can I do to start the 2nd one immediately and let all others yield for it?
thanks!
Re: How to set thread priority for QtConcurrent::map
Maybe your 1st thread can finish the job within a time slice. Therefore, the 2nd one always starts after the 1st one is finished.
Actually, on a single core computer, I do not think there is any way to run two threads concurrently.
The OS always assigns time slices to threads one by one.
Re: How to set thread priority for QtConcurrent::map
QtConcurrent doesn't support prioritizing tasks. Once a task is running and the pool of threads is depleted, all other tasks will pend until there is a thread available.