From 450d7a18ffffbaeb8722b2d84ec181fbff7e91bb Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Fri, 11 May 2018 21:43:25 -0400 Subject: 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). --- .../core/src/firebase/firestore/util/executor_libdispatch.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'Firestore/core/src/firebase/firestore/util/executor_libdispatch.h') 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&& work); +void DispatchAsync(dispatch_queue_t queue, std::function&& work); // Similar to `DispatchAsync` but wraps `dispatch_sync_f`. -void DispatchSync(const dispatch_queue_t queue, std::function work); +void DispatchSync(dispatch_queue_t queue, std::function 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. -- cgit v1.2.3