How in Qt would you keep a thread alive in the QThreadPool; as far as I’ve seen there is only an option to run a QRunnable and I’ve been told they can’t control the thread they are within. How would I, using the thread pool keep a socket alive and ready to read and write?
Share
QThreadPool manages its own threads. QT Doc says that
So you should not try to keep a thread alive. That breaks the purpose of thread pool.
Also QT sockets are designed to work well with the main event loop. Why don’t you try using them ?