>> Hi Guido >> >> It's very hard to make a guess with so little information. > > I know. But currently I don't have more and since there are quite a few > experienced programmers here, I hoped someone would have experienced > something similar. :-) > >> If the number of cores appears to affect the outcome of the execution, it >> usually means a threading problem (where "threading" here can be across >> processes too). If you increase the number of cores and it stops working, >> it's >> usually a race condition. > > *sigh* This will be hell to find. Especially since I don't have the slightest > idea where a race condition could be. And even worse, even if all > communication of the main program with the other three programs stops, it > should not freeze the whole process. More or less I send a few images via tcp > to a couple of services, which process them and send them back. If the images > never come back, the visible data in the main program isn't updated > correctly, but thats all I'd expect. > > Any chance that the non-blocking Qt network classes block? Never seen or > heard of it, but this would explain the behaviour. > >> Since decreasing the number of cores makes it work, > > Nope, increasing makes it work. But apparently not always. Or not for all > machines. Not sure, which of the two scenarios you described I should prefer > now. Even if I had the choice. ;-) > > Thanks, > Guido
Changing the number of cores should not freeze the program because of blocking classes! Even on 1 core it's possible to run many threads together. There is one thing that may change with the number of core : the result of QThread::idealThreadCount() if it's used somewhere. Also, poorly using QThreadPool or QtConcurrent may be affected by the number of cores, at it uses it in QThreadPool::maxThreadCount() Try doing QThreadPool::globalInstance()->setMaxThreadCount(1) at the beginning of your app to check if it reproduces the issue even on 4 cores or more _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest