core: Make run_in_bare_thread safe. No memory-unsafety here
wip