aboutsummaryrefslogtreecommitdiff
path: root/rtc_base/async_invoker_inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'rtc_base/async_invoker_inl.h')
-rw-r--r--rtc_base/async_invoker_inl.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/rtc_base/async_invoker_inl.h b/rtc_base/async_invoker_inl.h
index 6151059ab5..9fb328782c 100644
--- a/rtc_base/async_invoker_inl.h
+++ b/rtc_base/async_invoker_inl.h
@@ -21,32 +21,33 @@
namespace rtc {
-class AsyncInvoker;
+class DEPRECATED_AsyncInvoker;
// Helper class for AsyncInvoker. Runs a task and triggers a callback
// on the calling thread if necessary.
class AsyncClosure {
public:
- explicit AsyncClosure(AsyncInvoker* invoker);
+ explicit AsyncClosure(DEPRECATED_AsyncInvoker* invoker);
virtual ~AsyncClosure();
// Runs the asynchronous task, and triggers a callback to the calling
// thread if needed. Should be called from the target thread.
virtual void Execute() = 0;
protected:
- AsyncInvoker* invoker_;
+ DEPRECATED_AsyncInvoker* invoker_;
// Reference counted so that if the AsyncInvoker destructor finishes before
// an AsyncClosure's destructor that's about to call
// "invocation_complete_->Set()", it's not dereferenced after being
// destroyed.
- scoped_refptr<RefCountedObject<Event>> invocation_complete_;
+ rtc::Ref<Event>::Ptr invocation_complete_;
};
// Simple closure that doesn't trigger a callback for the calling thread.
template <class FunctorT>
class FireAndForgetAsyncClosure : public AsyncClosure {
public:
- explicit FireAndForgetAsyncClosure(AsyncInvoker* invoker, FunctorT&& functor)
+ explicit FireAndForgetAsyncClosure(DEPRECATED_AsyncInvoker* invoker,
+ FunctorT&& functor)
: AsyncClosure(invoker), functor_(std::forward<FunctorT>(functor)) {}
virtual void Execute() { functor_(); }