Threads locked in QtThreadPool when using QFuture
I have a strange problem when using QFuture.
My apps is a windows service, and it's happen only after a few day of running.
I use QtConcurrent::map with a function which query DNS using DnsQuery API from windows.
After a call to QtConcurrent::map with a list of 2 elements, QthreadPool contains 42 active threads and never decrease.
here's my log :
(call to QThreadPool::globalInstance()->activeThreadCount())
thread pool size: 0
DNS returned ... for ... in thread 2708
DNS returned... for ... in thread 3504
thread pool size: 42
an exemple of code :
m_watcher = new QFutureWatcher<void>();
connect(m_watcher, SIGNAL(finished()), this, SLOT(finished()));
so my question is: how is it possible that QtConcurrent create 42 threads for a list of 2 elements ?
thanks for those whose can help me !