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/executor_libdispatch.h | |
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/executor_libdispatch.h')
-rw-r--r-- | Firestore/core/src/firebase/firestore/util/executor_libdispatch.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Firestore/core/src/firebase/firestore/util/executor_libdispatch.h b/Firestore/core/src/firebase/firestore/util/executor_libdispatch.h index 85c34f8..f913fe5 100644 --- a/Firestore/core/src/firebase/firestore/util/executor_libdispatch.h +++ b/Firestore/core/src/firebase/firestore/util/executor_libdispatch.h @@ -45,10 +45,10 @@ namespace internal { // Generic wrapper over `dispatch_async_f`, providing `dispatch_async`-like // interface: accepts an arbitrary invocable object in place of an Objective-C // block. -void DispatchAsync(const dispatch_queue_t queue, std::function<void()>&& work); +void DispatchAsync(dispatch_queue_t queue, std::function<void()>&& work); // Similar to `DispatchAsync` but wraps `dispatch_sync_f`. -void DispatchSync(const dispatch_queue_t queue, std::function<void()> work); +void DispatchSync(dispatch_queue_t queue, std::function<void()> work); class TimeSlot; @@ -56,9 +56,7 @@ class TimeSlot; // a dedicated serial dispatch queue. class ExecutorLibdispatch : public Executor { public: - ExecutorLibdispatch(); explicit ExecutorLibdispatch(dispatch_queue_t dispatch_queue); - ~ExecutorLibdispatch(); bool IsCurrentExecutor() const override; std::string CurrentExecutorName() const override; @@ -79,11 +77,6 @@ class ExecutorLibdispatch : public Executor { } private: - // GetLabel functions are guaranteed to never return a "null" string_view - // (i.e. data() != nullptr). - absl::string_view GetCurrentQueueLabel() const; - absl::string_view GetTargetQueueLabel() const; - dispatch_queue_t dispatch_queue_; // Stores non-owned pointers to `TimeSlot`s. // Invariant: if a `TimeSlot` is in `schedule_`, it's a valid pointer. |