Multithreading with entire engine on one thread