Previously we did this just for workers, now we do it for the main thread and for forkOS threads too.