I wasn't sure about allow_blocking handling while trying to review the patch patch, so I ended up writing a few more tests, see the attached [patch](/uploads/c88db6158ef0c07c447cd7968f4af3e2/test.diff). It looks like that part still needs closer look, it works on Windows: https://testbot.winehq.org/JobDetails.pl?Key=127208 but fails with this MR.