27 using Post = std::function<bool(std::function<
void()>)>;
31 std::chrono::milliseconds
timeout = std::chrono::seconds(2);
53 std::chrono::milliseconds timeout);
59 Completion completion, std::chrono::milliseconds timeout);
91 std::chrono::milliseconds timeout,
bool allow_inline);
94 std::shared_ptr<Impl> impl_;
InspectorMessage call(std::int64_t request_id, Operation operation, Completion completion, std::chrono::milliseconds timeout)
As call(), with a deadline chosen for this request.
bool executing_on_current_thread() const
std::function< InspectorMessage()> Operation
Definition main_thread_rpc.hpp:25
std::function< bool(std::function< void()>)> Post
Definition main_thread_rpc.hpp:27
void cancel_and_wait()
Cancel queued work and wait for every operation already executing on another thread to reach its comp...
void cancel()
Stop accepting requests and cancel every queued operation that has not started.
InspectorMainThreadRpc(Config config)
bool after_current_operation(Completion completion)
Queue teardown work for the exact point at which the current operation has delivered its completion a...
InspectorMessage call(std::int64_t request_id, Operation operation, Completion completion)
As call(), with a callback that runs exactly once when the operation is no longer capable of applying...
bool set_posted_lifetime_callbacks(Completion begin, Completion end)
Install callbacks bracketing the aggregate lifetime of each posted callable handed to Post.
InspectorMessage call_queued_only(std::int64_t request_id, Operation operation, Completion completion, std::chrono::milliseconds timeout)
Strict variant for callers that require an enforceable response deadline.
InspectorMainThreadRpc(Config config, Post post, IsMainThread is_main_thread)
std::chrono::milliseconds default_timeout() const
Normalized per-call ceiling configured for this dispatcher.
~InspectorMainThreadRpc()
InspectorMessage call(std::int64_t request_id, Operation operation)
std::function< bool()> IsMainThread
Definition main_thread_rpc.hpp:28
InspectorMainThreadRpc(const InspectorMainThreadRpc &)=delete
std::function< void()> Completion
Definition main_thread_rpc.hpp:26
InspectorMainThreadRpc & operator=(const InspectorMainThreadRpc &)=delete
Definition agent_context.hpp:7
@ end
Definition geometry.hpp:370
Definition main_thread_rpc.hpp:30
std::chrono::milliseconds timeout
Definition main_thread_rpc.hpp:31
std::size_t max_pending
Definition main_thread_rpc.hpp:32
A single inspector protocol message (request, response, or event).
Definition protocol.hpp:18