Add assert for active_threads() to do-partition