Fix a regression on Windows where multiple threads are running an io_service.
This commit is contained in:
parent
6d378acf13
commit
ff5ed66909
@ -282,7 +282,8 @@ void win_iocp_io_service::on_pending(win_iocp_operation* op)
|
||||
if (::InterlockedCompareExchange(&op->ready_, 1, 0) == 1)
|
||||
{
|
||||
// Enqueue the operation on the I/O completion port.
|
||||
if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, op))
|
||||
if (!::PostQueuedCompletionStatus(iocp_.handle,
|
||||
0, overlapped_contains_result, op))
|
||||
{
|
||||
// Out of resources. Put on completed queue instead.
|
||||
mutex::scoped_lock lock(dispatch_mutex_);
|
||||
|
Loading…
Reference in New Issue
Block a user