void TWorkerStarter::startWorker(int fd, const QByteArray &request, const QString &address) { // // Create worker threads in main thread for signal/slot mechanism! // TActionWorker *worker = new TActionWorker(fd, THttpRequest(request, QHostAddress(address))); connect(worker, SIGNAL(finished()), multiplexingServer, SLOT(deleteActionContext())); multiplexingServer->insertPointer(worker); worker->start(); }
void TEpollHttpSocket::startWorker() { tSystemDebug("TEpollHttpSocket::startWorker"); TActionWorker *worker = new TActionWorker(this); worker->moveToThread(Tf::app()->thread()); connect(worker, SIGNAL(finished()), this, SLOT(releaseWorker())); ++myWorkerCounter; // count-up worker->start(); }