Empty list of modules when thread is shut down.