diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-06-05 19:12:46 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-06-05 19:12:46 +0200 |
commit | 82949d1a4372c3b9e200c382dc709a09efaa7519 (patch) | |
tree | 470cf2f7d86727e22d537f4e7cb9b751c6395640 /src/Common | |
parent | 3364de01f3f5d50b93d35c438217cf977ab1304e (diff) | |
download | mad-82949d1a4372c3b9e200c382dc709a09efaa7519.tar mad-82949d1a4372c3b9e200c382dc709a09efaa7519.zip |
handlePacket asyncron aufrufen
Diffstat (limited to 'src/Common')
-rw-r--r-- | src/Common/RequestHandler.h | 5 | ||||
-rw-r--r-- | src/Common/RequestManager.cpp | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/Common/RequestHandler.h b/src/Common/RequestHandler.h index 917649e..f01db41 100644 --- a/src/Common/RequestHandler.h +++ b/src/Common/RequestHandler.h @@ -43,11 +43,6 @@ class RequestHandler : private boost::noncopyable { Net::Signals::Signal0 finished; - void callHandlePacket(boost::shared_ptr<const XmlPacket> packet) { - boost::lock_guard<boost::mutex> lock(mutex); - handlePacket(packet); - } - protected: RequestHandler() {} diff --git a/src/Common/RequestManager.cpp b/src/Common/RequestManager.cpp index 368cfb5..3785b3f 100644 --- a/src/Common/RequestManager.cpp +++ b/src/Common/RequestManager.cpp @@ -96,7 +96,7 @@ void RequestManager::receiveHandler(Connection *connection, boost::shared_ptr<co boost::shared_ptr<RequestHandler> request = requestMap.findRequest(connection, requestId); if(request) { lock.unlock(); - request->callHandlePacket(packet); + Net::ThreadManager::get()->pushWork(boost::bind(&RequestHandler::handlePacket, request, packet)); return; } @@ -120,7 +120,7 @@ void RequestManager::receiveHandler(Connection *connection, boost::shared_ptr<co } lock.unlock(); - request->callHandlePacket(packet); + Net::ThreadManager::get()->pushWork(boost::bind(&RequestHandler::handlePacket, request, packet)); return; } |