isolated test for main in multithreading