set wait to False in scheduler shutdown; read TODO there.