[SOLVED]How to ensure QtConcurrent::run ( Function function, ... ) always runs
General and Desktop
3
Posts
2
Posters
1.4k
Views
1
Watching
-
As per Qt doc,
@QFuture<T> QtConcurrent::run ( Function function, ... )
Runs function in a separate thread. The thread is taken from the global QThreadPool. Note that the function may not run immediately; the function will only be run when a thread is available.@And i doubt, sometimes even function is not called at all. Is there any way to ensure that function is always called by reserving thread before calling run().
-
Hi,
I think the better way is to sub-class "QThread":http://qt-project.org/doc/qt-4.8/qthread.html and make your own management.