Enable canceling win32 file I/O.

The CancelIOEx call was disabled just due to historical reasons.
This commit is contained in:
Sönke Ludwig 2018-02-22 01:12:13 +01:00
parent 97b154048d
commit c8f95f324b

View file

@ -8,7 +8,6 @@ import eventcore.internal.win32;
private extern(Windows) @trusted nothrow @nogc { private extern(Windows) @trusted nothrow @nogc {
BOOL SetEndOfFile(HANDLE hFile); BOOL SetEndOfFile(HANDLE hFile);
BOOL CancelIoEx(HANDLE hFile, OVERLAPPED* lpOverlapped);
} }
final class WinAPIEventDriverFiles : EventDriverFiles { final class WinAPIEventDriverFiles : EventDriverFiles {
@ -170,7 +169,7 @@ final class WinAPIEventDriverFiles : EventDriverFiles {
{ {
if (slot.callback) { if (slot.callback) {
m_core.removeWaiter(); m_core.removeWaiter();
//CancelIoEx(h, &slot.overlapped); // FIXME: currently causes linker errors for DMD due to outdated kernel32.lib files () @trusted { CancelIoEx(h, &slot.overlapped); } ();
slot.callback = null; slot.callback = null;
slot.buffer = null; slot.buffer = null;
} }