[runtime] Simplify the io-layer threading code a bit more.