/* * Copyright 2019 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
OperationsChain::~OperationsChain() { // Operations keep the chain alive through reference counting so this should // not be possible. The fact that the chain is empty makes it safe to // destroy the OperationsChain on any sequence.
RTC_DCHECK(chained_operations_.empty());
}
void OperationsChain::OnOperationComplete() {
RTC_DCHECK_RUN_ON(&sequence_checker_); // The front element is the operation that just completed, remove it.
RTC_DCHECK(!chained_operations_.empty());
chained_operations_.pop(); // If there are any other operations chained, execute the next one. Otherwise, // invoke the "on chain empty" callback if it has been set. if (!chained_operations_.empty()) {
chained_operations_.front()->Run();
} elseif (on_chain_empty_callback_.has_value()) {
on_chain_empty_callback_.value()();
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.