16#include "pw_async2/runnable_dispatcher.h"
22template <
typename Pendable>
25 using value_type = PendOutputOf<Pendable>;
27 : pendable_(pendable), output_(
Pending()) {}
33 output_ = pendable_.Pend(cx);
52template <
typename Native>
68 template <
typename Pendable>
82 return task.TakePoll();
98 bool DoRunUntilStalled()
override;
107 bool blocking_is_allowed_ =
false;
110 uint32_t tasks_polled_ = 0u;
111 uint32_t tasks_completed_ = 0u;
112 uint32_t wake_count_ = 0u;
117#include "pw_async2_backend/native_dispatcher_for_test.h"
119namespace pw::async2 {
Definition: dispatcher_for_test.h:53
Definition: runnable_dispatcher.h:24
Definition: dispatcher_for_test.h:23
constexpr Poll Readiness() const noexcept
Definition: poll.h:140
constexpr PendingType Pending()
Returns a value indicating that an operation was not yet able to complete.
Definition: poll.h:271
bool RunUntilStalled()
Definition: runnable_dispatcher.h:30
uint32_t wake_count() const
Returns the total number of times the dispatcher has been woken.
Definition: dispatcher_for_test.h:93
DispatcherForTestFacade()=default
DispatcherForTest is default constructible.
uint32_t tasks_polled() const
Definition: dispatcher_for_test.h:87
Poll DoPend(Context &cx) final
Definition: dispatcher_for_test.h:32
uint32_t tasks_completed() const
Returns the total number of tasks the dispatcher has run to completion.
Definition: dispatcher_for_test.h:90
void DoWaitForWake() override
void AllowBlocking()
Definition: dispatcher_for_test.h:66
#define PW_LOCKS_EXCLUDED(...)
Definition: lock_annotations.h:176