Moved awkward io-bridge passing to a THREAD_LOCAL