Use lock_guard<> instead of unique_lock<> internally. Clear out generations after notify_all, as they're all notified