diff options
Diffstat (limited to 'rtc_base/async_invoker.h')
-rw-r--r-- | rtc_base/async_invoker.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/rtc_base/async_invoker.h b/rtc_base/async_invoker.h index d3bb9a22f9..fd42ca76de 100644 --- a/rtc_base/async_invoker.h +++ b/rtc_base/async_invoker.h @@ -15,6 +15,7 @@ #include <memory> #include <utility> +#include "absl/base/attributes.h" #include "api/scoped_refptr.h" #include "rtc_base/async_invoker_inl.h" #include "rtc_base/constructor_magic.h" @@ -86,10 +87,10 @@ namespace rtc { // destruction. This can be done by starting each chain of invocations on the // same thread on which it will be destroyed, or by using some other // synchronization method. -class AsyncInvoker : public MessageHandlerAutoCleanup { +class DEPRECATED_AsyncInvoker : public MessageHandlerAutoCleanup { public: - AsyncInvoker(); - ~AsyncInvoker() override; + DEPRECATED_AsyncInvoker(); + ~DEPRECATED_AsyncInvoker() override; // Call |functor| asynchronously on |thread|, with no callback upon // completion. Returns immediately. @@ -156,7 +157,7 @@ class AsyncInvoker : public MessageHandlerAutoCleanup { // 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_; // This flag is used to ensure that if an application AsyncInvokes tasks that // recursively AsyncInvoke other tasks ad infinitum, the cycle eventually @@ -165,9 +166,12 @@ class AsyncInvoker : public MessageHandlerAutoCleanup { friend class AsyncClosure; - RTC_DISALLOW_COPY_AND_ASSIGN(AsyncInvoker); + RTC_DISALLOW_COPY_AND_ASSIGN(DEPRECATED_AsyncInvoker); }; +using AsyncInvoker ABSL_DEPRECATED("bugs.webrtc.org/12339") = + DEPRECATED_AsyncInvoker; + } // namespace rtc #endif // RTC_BASE_ASYNC_INVOKER_H_ |