Sane multithreading