The for_each_running_thread() macro loops through only those threads that currently exist. It is the caller's responsibility to synchronize with thread creation and deletion if required.