curl-fuzzer C++ reference
Loading...
Searching...
No Matches
resolver_cancel_gate.h File Reference

Bounded rendezvous for the resolver queued-cancellation scenario. More...

Go to the source code of this file.

Classes

struct  proto_fuzzer::resolver_cancel_detail::GateState
 Shared state for the single opt-in resolver cancellation rendezvous. More...
class  proto_fuzzer::ScopedResolverCancelGate
 Hold the first opt-in getaddrinfo call until the public multi owner has queued the cancellation handle's lookups. More...

Functions

GateState & proto_fuzzer::resolver_cancel_detail::State ()
 Access the process-wide resolver cancellation rendezvous.
bool proto_fuzzer::WaitForResolverCancelLookup (std::chrono::milliseconds timeout)
 Give curl's single resolver worker a bounded opportunity to take the first family before the main thread queues the cancellation handle.
void proto_fuzzer::WaitAtResolverCancelGate ()
 Block only the first lookup issued while ScopedResolverCancelGate is live.

Detailed Description

Bounded rendezvous for the resolver queued-cancellation scenario.

Definition in file resolver_cancel_gate.h.

Function Documentation

◆ State()

GateState & proto_fuzzer::resolver_cancel_detail::State ( )
inline

Access the process-wide resolver cancellation rendezvous.

Returns
Shared gate state.

Definition at line 35 of file resolver_cancel_gate.h.

◆ WaitAtResolverCancelGate()

void proto_fuzzer::WaitAtResolverCancelGate ( )
inline

Block only the first lookup issued while ScopedResolverCancelGate is live.

The scope owns the release: every exit path destroys it before multi destruction or blocker removal can join this worker. Waiting for that explicit release prevents scheduler speed from changing the queue shape.

Definition at line 83 of file resolver_cancel_gate.h.

◆ WaitForResolverCancelLookup()

bool proto_fuzzer::WaitForResolverCancelLookup ( std::chrono::milliseconds timeout)
inline

Give curl's single resolver worker a bounded opportunity to take the first family before the main thread queues the cancellation handle.

Parameters
timeoutMaximum time to wait for the resolver worker.
Returns
true when the first lookup reached the gate before the deadline.

Definition at line 73 of file resolver_cancel_gate.h.