closed_mutex removed in favor of atomic<bool> closed