Skip to content

Commit 4ba0ac2

Browse files
committed
os/windows/named-pipe: Update to async_request::completion_routine
This adds support for callbacks in async_op, which are run whenever the waitable read()/write() is signalled. Callbacks do not work for other requests, like accept(). Generally callbacks should be used sparingly as they might not be supported across platforms. They are only there to ease the coding effort on various platforms that do support them.
1 parent 6e01810 commit 4ba0ac2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/os/windows/named-pipe.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ os::error os::windows::named_pipe::read(std::unique_ptr<os::windows::async_reque
211211

212212
SetLastError(ERROR_SUCCESS);
213213
if (!ReadFileEx(handle, buffer, DWORD(buffer_length), request->get_overlapped_pointer(),
214-
overlapped::completion_routine)
214+
os::windows::async_request::completion_routine)
215215
|| (GetLastError() != ERROR_SUCCESS)) {
216216
DWORD error = GetLastError();
217217
if (error == ERROR_MORE_DATA) {
@@ -237,7 +237,7 @@ os::error os::windows::named_pipe::write(std::unique_ptr<os::windows::async_requ
237237

238238
SetLastError(ERROR_SUCCESS);
239239
if (!WriteFileEx(handle, buffer, DWORD(buffer_length), request->get_overlapped_pointer(),
240-
overlapped::completion_routine)
240+
os::windows::async_request::completion_routine)
241241
|| (GetLastError() != ERROR_SUCCESS)) {
242242
DWORD error = GetLastError();
243243
if (error == ERROR_MORE_DATA) {

0 commit comments

Comments
 (0)