This particular assertion happened when shutting down Innodb IO.IO shutdown properly waits for all IOs to finish
However there is a race condition -
right after releasing last IO slot and before decrementing task count
in group, pending_io_count will be 0, but tasks_running will be 1,
leading to assertion.
The fix is to make task_group destructor to wait for last running task
to finish.
The library is capable of
- asynchronous execution of tasks (and optionally waiting for them)
- asynchronous file IO
This is implemented using libaio on Linux and completion ports on
Windows. Elsewhere, async io is "simulated", which means worker threads
are performing synchronous IO.
- timers, scheduling work asynchronously in some point of the future.
Also periodic timers are implemented.