diff options
author | Konstantin Varlamov <var-const@users.noreply.github.com> | 2018-05-11 21:43:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-11 21:43:25 -0400 |
commit | 450d7a18ffffbaeb8722b2d84ec181fbff7e91bb (patch) | |
tree | 557eb31d4eebb09de046dbdae17ea7f983b6c880 /Firestore/core/src/firebase/firestore/util/async_queue.cc | |
parent | 604de8e947ee8e58094bb2d7cb4cc7ac16e97876 (diff) |
Firestore C++: make FSTDispatchQueue delegate to C++ implementation (#1240)
FSTDispatchQueue now doesn't contain any logic of its own and instead
just passes through all method calls to AsyncQueue (backed by an
ExecutorLibdispatch).
Diffstat (limited to 'Firestore/core/src/firebase/firestore/util/async_queue.cc')
-rw-r--r-- | Firestore/core/src/firebase/firestore/util/async_queue.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Firestore/core/src/firebase/firestore/util/async_queue.cc b/Firestore/core/src/firebase/firestore/util/async_queue.cc index 71f5cc5..81aac7c 100644 --- a/Firestore/core/src/firebase/firestore/util/async_queue.cc +++ b/Firestore/core/src/firebase/firestore/util/async_queue.cc @@ -32,6 +32,8 @@ AsyncQueue::AsyncQueue(std::unique_ptr<Executor> executor) is_operation_in_progress_ = false; } +// TODO(varconst): assert in destructor that the queue is empty. + void AsyncQueue::VerifyIsCurrentExecutor() const { FIREBASE_ASSERT_MESSAGE( executor_->IsCurrentExecutor(), @@ -97,8 +99,8 @@ void AsyncQueue::VerifySequentialOrder() const { // This is the inverse of `VerifyIsCurrentQueue`. FIREBASE_ASSERT_MESSAGE( !is_operation_in_progress_ || !executor_->IsCurrentExecutor(), - "Enforcing sequential order failed: currently executing operations " - "cannot enqueue more operations " + "Enqueue methods cannot be called when we are already running on " + "target executor" "(this queue's executor: '%s', current executor: '%s')", executor_->Name().c_str(), executor_->CurrentExecutorName().c_str()); } |