Loading services/inputflinger/dispatcher/trace/ThreadedBackend.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -38,10 +38,10 @@ struct Visitor : V... { template <typename Backend> ThreadedBackend<Backend>::ThreadedBackend(Backend&& innerBackend) : mTracerThread( : mBackend(std::move(innerBackend)), mTracerThread( "InputTracer", [this]() { threadLoop(); }, [this]() { mThreadWakeCondition.notify_all(); }), mBackend(std::move(innerBackend)) {} [this]() { mThreadWakeCondition.notify_all(); }) {} template <typename Backend> ThreadedBackend<Backend>::~ThreadedBackend() { Loading services/inputflinger/dispatcher/trace/ThreadedBackend.h +5 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ public: private: std::mutex mLock; InputThread mTracerThread; bool mThreadExit GUARDED_BY(mLock){false}; std::condition_variable mThreadWakeCondition; Backend mBackend; Loading @@ -53,6 +52,11 @@ private: TracedEventArgs>; std::vector<TraceEntry> mQueue GUARDED_BY(mLock); // InputThread stops when its destructor is called. Initialize it last so that it is the // first thing to be destructed. This will guarantee the thread will not access other // members that have already been destructed. InputThread mTracerThread; void threadLoop(); }; Loading Loading
services/inputflinger/dispatcher/trace/ThreadedBackend.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -38,10 +38,10 @@ struct Visitor : V... { template <typename Backend> ThreadedBackend<Backend>::ThreadedBackend(Backend&& innerBackend) : mTracerThread( : mBackend(std::move(innerBackend)), mTracerThread( "InputTracer", [this]() { threadLoop(); }, [this]() { mThreadWakeCondition.notify_all(); }), mBackend(std::move(innerBackend)) {} [this]() { mThreadWakeCondition.notify_all(); }) {} template <typename Backend> ThreadedBackend<Backend>::~ThreadedBackend() { Loading
services/inputflinger/dispatcher/trace/ThreadedBackend.h +5 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ public: private: std::mutex mLock; InputThread mTracerThread; bool mThreadExit GUARDED_BY(mLock){false}; std::condition_variable mThreadWakeCondition; Backend mBackend; Loading @@ -53,6 +52,11 @@ private: TracedEventArgs>; std::vector<TraceEntry> mQueue GUARDED_BY(mLock); // InputThread stops when its destructor is called. Initialize it last so that it is the // first thing to be destructed. This will guarantee the thread will not access other // members that have already been destructed. InputThread mTracerThread; void threadLoop(); }; Loading