]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2211] use swap instead of splice. for this purpose it's enough and simpler.
authorJINMEI Tatuya <jinmei@isc.org>
Mon, 22 Oct 2012 17:55:53 +0000 (10:55 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Mon, 22 Oct 2012 17:55:53 +0000 (10:55 -0700)
src/bin/auth/datasrc_clients_mgr.h

index 01c346f43ba53c65fee64ef1ad3fd80e1d9524bc..4cef69ef23b470f35ea35e927704d4c70ebe868c 100644 (file)
@@ -356,13 +356,12 @@ DataSrcClientsBuilderBase<MutexType, CondVarType>::run() {
             std::list<Command> current_commands;
             {
                 // Move all new commands to local queue under the protection of
-                // queue_mutex_.  Note that list::splice() should never throw.
+                // queue_mutex_.
                 typename MutexType::Locker locker(*queue_mutex_);
                 while (command_queue_->empty()) {
                     cond_->wait(*queue_mutex_);
                 }
-                current_commands.splice(current_commands.end(),
-                                        *command_queue_);
+                current_commands.swap(*command_queue_);
             } // the lock is release here.
 
             while (keep_running && !current_commands.empty()) {