15#include <asio/execution.hpp>
73 friend struct asio::execution::detail::context_t<0>;
74 friend struct asio::execution::detail::mapping_t<0>;
75 friend struct asio::execution::detail::blocking_t<0>;
76 friend struct asio::execution::detail::relationship_t<0>;
77 friend struct asio::execution::detail::outstanding_work_t<0>;
78 friend struct asio::execution::detail::bulk_guarantee_t<0>;
79 friend struct asio::execution::detail::occupancy_t<0>;
105 static std::allocator<void> allocator;
111 static std::allocator<void> allocator;
#define CE_ASSERT(...)
Definition Macros.hpp:323
An ASIO execution context that wraps the operating system run loop.
Definition RunLoop.hpp:17
An executor object that dispatches calls to the CoreFoundation CFRunLoop.
Definition Win32RunLoop.hpp:24
std::allocator< void > query(ExecutorAllocator< OtherAllocator >) const noexcept
Query the current value of the allocator property.
Definition Win32RunLoop.hpp:104
static constexpr ExecutorMapping query(ExecutorMapping) noexcept
Query the current value of the mapping property.
Definition Win32RunLoop.hpp:85
Executor require(const ExecutorBlocking blocking) const
Obtain an executor with the given blocking property.
Definition Win32RunLoop.hpp:129
friend struct asio_prefer_fn::impl
Definition Win32RunLoop.hpp:117
std::size_t query(ExecutorOccupancy) const noexcept
Query the occupancy (recommended number of work items) for the system context.
Definition Win32RunLoop.hpp:101
Executor(Win32RunLoop *const executionContext, const ExecutorBlocking blockingProperty=ExecutorBlocking::never)
Creates a new Executor instance.
Definition Win32RunLoop.hpp:39
static constexpr ExecutorOutstandingWork query(ExecutorOutstandingWork) noexcept
Query the current value of the outstanding_work property.
Definition Win32RunLoop.hpp:94
Executor & operator=(const Executor &)=default
Win32RunLoop * mExecutionContext
The execution context that the executor will use.
Definition Win32RunLoop.hpp:29
Win32RunLoop & context() const noexcept
Obtain the underlying execution context.
Definition Win32RunLoop.hpp:50
Executor & operator=(Executor &&)=default
ExecutorBlocking query(ExecutorBlocking) const noexcept
Query the current value of the blocking property.
Definition Win32RunLoop.hpp:88
Executor(Executor &&)=default
static constexpr ExecutorBulkGuarantee query(ExecutorBulkGuarantee) noexcept
Query the current value of the bulk_guarantee property.
Definition Win32RunLoop.hpp:97
friend struct asio_execution_execute_fn::impl
Definition Win32RunLoop.hpp:132
void on_work_finished() const noexcept
Inform the executor that some work is no longer outstanding.
Definition Win32RunLoop.hpp:59
friend struct asio_require_fn::impl
Definition Win32RunLoop.hpp:116
friend bool operator!=(const Executor &, const Executor &) noexcept
Compare two executors for inequality.
Definition Win32RunLoop.hpp:69
void on_work_started() const noexcept
Inform the executor that it has some outstanding work to do.
Definition Win32RunLoop.hpp:53
friend bool operator==(const Executor &, const Executor &) noexcept
Compare two executors for equality.
Definition Win32RunLoop.hpp:66
static constexpr ExecutorRelationship query(ExecutorRelationship) noexcept
Query the current value of the relationship property.
Definition Win32RunLoop.hpp:91
std::allocator< void > query(ExecutorAllocator< void >) const noexcept
Query the current value of the allocator property.
Definition Win32RunLoop.hpp:110
void execute(ASIO_MOVE_ARG(Function) f) const
Execution function.
Definition Win32RunLoop.hpp:135
friend struct asio_query_fn::impl
Definition Win32RunLoop.hpp:72
Executor(const Executor &)=default
Win32RunLoop & query(ExecutorExecutionContext) const noexcept
Query the current value of the context property.
Definition Win32RunLoop.hpp:82
ExecutorBlocking mBlockingProperty
A property that customizes the blocking behavior of the executor.
Definition Win32RunLoop.hpp:32
Abstracts a CoreFoundation CFRunLoop as an ASIO execution context.
Definition Win32RunLoop.hpp:20
executor_type get_executor() noexcept
Returns an executor that run execute scheduled commands on the context.
Definition Win32RunLoop.hpp:178
DWORD mThreadID
The Win32 thread ID.
Definition Win32RunLoop.hpp:143
void onWorkFinished() noexcept
Inform the executor that some work is no longer outstanding.
AnyExecutor getExecutor() noexcept final
Returns an executor that run execute scheduled commands on the context.
void run() final
Starts running the run loop.
void onWorkStarted() noexcept
Inform the executor that it has some outstanding work to do.
void schedule(UniqueFunction< void()> function, ExecutorBlocking blockingProperty)
Schedules a new function to be run in the run loop.
void stop() final
Stops the execution of the run loop.
Win32RunLoop() noexcept
Creates a new win32 run loop instance for the current thread.
Definition Application.hpp:19
asio::execution::context_t ExecutorExecutionContext
Definition ExecutionContext.hpp:208
asio::execution::relationship_t ExecutorRelationship
Definition ExecutionContext.hpp:215
asio::execution::mapping_t ExecutorMapping
Definition ExecutionContext.hpp:211
asio::execution::bulk_guarantee_t ExecutorBulkGuarantee
Definition ExecutionContext.hpp:214
asio::execution::occupancy_t ExecutorOccupancy
Definition ExecutionContext.hpp:212
FunctionBase< true, true, fu2::capacity_default, true, false, Signatures... > Function
An owning copyable function wrapper for arbitrary callable types.
Definition Function.hpp:54
asio::execution::allocator_t< T > ExecutorAllocator
Definition ExecutionContext.hpp:216
asio::execution::blocking_t ExecutorBlocking
Definition ExecutionContext.hpp:210
asio::execution::outstanding_work_t ExecutorOutstandingWork
Definition ExecutionContext.hpp:213
ASIO_MOVE_ARG(CompletionToken) token)
Definition IdleService.hpp:42
FunctionBase< true, false, fu2::capacity_default, true, false, Signatures... > UniqueFunction
An owning non copyable function wrapper for arbitrary callable types.
Definition Function.hpp:59
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25