Am 01.11.2017 um 17:16 schrieb Dietmar Maurer:

Seems createDirectory simply calls mkdir, which is AFAIK a blocking call.

Is there a way to create directories async?

The only way, AFAIK, is to let them run in a separate thread. The
easiest and reasonably fast approach would be to use a worker task:

auto t = runWorkerTaskH({ createDirectory(dir); }, dir);
t.join();
});

I didn't go that route for this and all similar functions (removeFile,
listDirectory etc.) so far, because the thread synchronization overhead
can be non-trivial if each call is handled like this individually
instead of batching many operations together. But in general this is
something that should definitely be tackled somehow (maybe using an
optional parameter to explicitly enable either the current behavior or a
built-in thread wrapper).