Re: [boost] Asio multithreaded server

berserker_r <berserker_r@hotmail.com> wrote:
Christopher Kohlhoff wrote:
What OS are you using? Is the session's work CPU bound?
I'm on Windows XP,
Great, that confirmed what I suspected was the cause of the problem.
sry but I can't understand what you mean with the second question...
"CPU bound" means that the thing that the code doesn't perform any blocking I/O or other operation that might cause the thread to sleep for a time. Anyway, I have just committed a fix to CVS head for this. If you want to patch your own copy with a temporary fix, make the following change to asio/detail/win_iocp_io_service.hpp: // Constructor. win_iocp_io_service(asio::io_service& io_service) : asio::io_service::service(io_service), - iocp_(::CreateIoCompletionPort(INVALID_HANDLE_VALUE, 0, 0, 0)), + iocp_(::CreateIoCompletionPort(INVALID_HANDLE_VALUE, 0, 0, ~0)), outstanding_work_(0), interrupted_(0), shutdown_(0) Cheers, Chris

Christopher Kohlhoff wrote:
Anyway, I have just committed a fix to CVS head for this. If you want to patch your own copy with a temporary fix, make the following change to asio/detail/win_iocp_io_service.hpp:
// Constructor. win_iocp_io_service(asio::io_service& io_service) : asio::io_service::service(io_service), - iocp_(::CreateIoCompletionPort(INVALID_HANDLE_VALUE, 0, 0, 0)), + iocp_(::CreateIoCompletionPort(INVALID_HANDLE_VALUE, 0, 0, ~0)), outstanding_work_(0), interrupted_(0), shutdown_(0)
Thanks!I'll try that ;)
participants (2)
-
berserker_r
-
Christopher Kohlhoff