MariaDB 5.3 - Asynchronous I/O on Windows with InnoDB
void io_thread() {
HANDLE handles = new HANDLE[32];
...
for (;;) {
DWORD index = WaitForMultipleObjects(handles,32, FALSE);
DWORD num_bytes;
// Find file and overlapped structure for the index,
GetOverlappedResult(file, overlapped, &num_bytes, TRUE);
// handle io represented by overlapped
}void io_thread() {
for (;;) {
DWORD num_bytes;
ULONG_PTR key;
OVERLAPPED *overlapped;
if (GetQueuedCompletionStatus(io_completion_port, &num_bytes,
&key, &overlapped, INFINITE)) {
// handle io represented by overlapped
}
}Notes
Last updated
Was this helpful?

