Solved Should I put connect to another thread?
I have a QSocketNotifier to watch one socket, and the slot function is in another thread.
But now I call connect in my main thread
connect(notifier, &QSocketNotifier::activated, tunFwd, &TunFwd::forwardTunPacket);
The socket may have large packets to read, so activated signal will be emit frequently. Will this influence GUI main thread? Is it necessary to put the calling of connect to another thread?
jsulm Lifetime Qt Champion last edited by
@Mr-Pang It doesn't mater in which thread you call connect() as it just connects the signal to slot. If slot is executed in another thread then your UI thread should stay responsive.