Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts > Class Template Referencefinal

#include <activity.h>

Inheritance diagram for grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >:
Inheritance graph
[legend]

Classes

union  PromiseHolder
 

Public Types

using Factory = PromiseFactory< void, F >
 
using ResultType = typename Factory::Promise::Result
 

Public Member Functions

 PromiseActivity (F promise_factory, WakeupScheduler wakeup_scheduler, OnDone on_done, Contexts &&... contexts)
 
void RunScheduledWakeup ()
 
 ~PromiseActivity () override
 
- Public Member Functions inherited from grpc_core::promise_detail::FreestandingActivity
void ForceImmediateRepoll () final
 
Waker MakeNonOwningWaker () final
 
Waker MakeOwningWaker () final
 
void Orphan () final
 
- Public Member Functions inherited from grpc_core::Activity
void ForceWakeup ()
 
- Public Member Functions inherited from grpc_core::Orphanable
Orphanableoperator= (const Orphanable &)=delete
 
 Orphanable (const Orphanable &)=delete
 

Private Types

using Promise = typename Factory::Promise
 
- Private Types inherited from grpc_core::promise_detail::ContextHolder< Contexts >
using ContextType = Contexts
 

Private Member Functions

GPR_NO_UNIQUE_ADDRESS bool done_ ABSL_GUARDED_BY (mu())
 
GPR_NO_UNIQUE_ADDRESS PromiseHolder promise_holder_ ABSL_GUARDED_BY (mu())
 
void Cancel () final
 
void Drop () final
 
void MarkDone () ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu())
 
absl::optional< ResultTypeRunStep () ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu())
 
absl::optional< ResultTypeStart (Factory promise_factory) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu())
 
void Step () ABSL_LOCKS_EXCLUDED(mu())
 
absl::optional< ResultTypeStepLoop () ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu())
 
void Wakeup () final
 
- Private Member Functions inherited from grpc_core::promise_detail::ActivityContexts< Contexts... >
 ActivityContexts (Contexts &&... contexts)
 
- Private Member Functions inherited from grpc_core::promise_detail::ContextHolder< Contexts >
 ContextHolder (Contexts value)
 
Contexts * GetContext ()
 

Private Attributes

GPR_NO_UNIQUE_ADDRESS OnDone on_done_
 
GPR_NO_UNIQUE_ADDRESS std::atomic< boolwakeup_scheduled_ {false}
 
GPR_NO_UNIQUE_ADDRESS WakeupScheduler wakeup_scheduler_
 

Additional Inherited Members

- Static Public Member Functions inherited from grpc_core::Activity
static Activitycurrent ()
 
- Protected Types inherited from grpc_core::promise_detail::FreestandingActivity
enum  ActionDuringRun : uint8_t { ActionDuringRun::kNone, ActionDuringRun::kWakeup, ActionDuringRun::kCancel }
 
- Protected Member Functions inherited from grpc_core::promise_detail::FreestandingActivity
ActionDuringRun GotActionDuringRun () ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
Mutexmu () ABSL_LOCK_RETURNED(mu_)
 
void SetActionDuringRun (ActionDuringRun action) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void WakeupComplete ()
 
 ~FreestandingActivity () override
 
- Protected Member Functions inherited from grpc_core::Activity
bool is_current () const
 
- Protected Member Functions inherited from grpc_core::Orphanable
 Orphanable ()
 
virtual ~Orphanable ()
 
- Static Protected Member Functions inherited from grpc_core::Activity
static bool have_current ()
 

Detailed Description

template<class F, class WakeupScheduler, class OnDone, typename... Contexts>
class grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >

Definition at line 339 of file activity.h.

Member Typedef Documentation

◆ Factory

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
using grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::Factory = PromiseFactory<void, F>

Definition at line 342 of file activity.h.

◆ Promise

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
using grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::Promise = typename Factory::Promise
private

Definition at line 496 of file activity.h.

◆ ResultType

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
using grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::ResultType = typename Factory::Promise::Result

Definition at line 343 of file activity.h.

Constructor & Destructor Documentation

◆ PromiseActivity()

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::PromiseActivity ( promise_factory,
WakeupScheduler  wakeup_scheduler,
OnDone  on_done,
Contexts &&...  contexts 
)
inline

Definition at line 345 of file activity.h.

◆ ~PromiseActivity()

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::~PromiseActivity ( )
inlineoverride

Definition at line 364 of file activity.h.

Member Function Documentation

◆ ABSL_GUARDED_BY() [1/2]

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
GPR_NO_UNIQUE_ADDRESS bool done_ grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::ABSL_GUARDED_BY ( mu()  )
private

◆ ABSL_GUARDED_BY() [2/2]

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
GPR_NO_UNIQUE_ADDRESS PromiseHolder promise_holder_ grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::ABSL_GUARDED_BY ( mu()  )
private

◆ Cancel()

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
void grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::Cancel ( )
inlinefinalprivatevirtual

Implements grpc_core::promise_detail::FreestandingActivity.

Definition at line 380 of file activity.h.

◆ Drop()

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
void grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::Drop ( )
inlinefinalprivatevirtual

Implements grpc_core::Wakeable.

Definition at line 423 of file activity.h.

◆ MarkDone()

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
void grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::MarkDone ( )
inlineprivate

Definition at line 427 of file activity.h.

◆ RunScheduledWakeup()

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
void grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::RunScheduledWakeup ( )
inline

Definition at line 371 of file activity.h.

◆ RunStep()

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
absl::optional<ResultType> grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::RunStep ( )
inlineprivate

Definition at line 453 of file activity.h.

◆ Start()

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
absl::optional<ResultType> grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::Start ( Factory  promise_factory)
inlineprivate

Definition at line 462 of file activity.h.

◆ Step()

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
void grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::Step ( )
inlineprivate

Definition at line 435 of file activity.h.

◆ StepLoop()

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
absl::optional<ResultType> grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::StepLoop ( )
inlineprivate

Definition at line 472 of file activity.h.

◆ Wakeup()

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
void grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::Wakeup ( )
inlinefinalprivatevirtual

Implements grpc_core::Wakeable.

Definition at line 404 of file activity.h.

Member Data Documentation

◆ on_done_

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
GPR_NO_UNIQUE_ADDRESS OnDone grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::on_done_
private

Definition at line 500 of file activity.h.

◆ wakeup_scheduled_

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
GPR_NO_UNIQUE_ADDRESS std::atomic<bool> grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::wakeup_scheduled_ {false}
private

Definition at line 504 of file activity.h.

◆ wakeup_scheduler_

template<class F , class WakeupScheduler , class OnDone , typename... Contexts>
GPR_NO_UNIQUE_ADDRESS WakeupScheduler grpc_core::promise_detail::PromiseActivity< F, WakeupScheduler, OnDone, Contexts >::wakeup_scheduler_
private

Definition at line 498 of file activity.h.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:39