Am 07.11.2017 um 15:00 schrieb Dietmar Maurer:

I wonder why this class creates two extra threads? I thought such things can/should be implemented using the event loop, which provides non-blocking read/write functionality?

True, StdFileStream just hasn't been a priority so far. There have
been recurrent questions about a solution in general, so I just
integrated the generic version that I did for a non-performance-critical
piece of software a while ago. Integrating it into the event loop
requires a bit more work, because Windows behaves very differently and
it has implications for other code that directly uses the same I/O
handles. But it is something that should definitely be tackled at some
point.

To accelerate the process, it would of course also be possible to work
on this step by step, keeping the thread based approach for Windows and
using non-blocking I/O for Posix systems.