Expand description
Thread-safe browser page pool for tracking concurrent page usage.
When a session is configured with max_pages > 1, multiple pages can be open
simultaneously. The PagePool keeps track of how many pages exist, which ones
are busy, and enforces the capacity limit so the browser does not consume
unbounded resources.
Each page is identified by a zero-based page_index and transitions through
three states defined by PageState:
Ready ──▶ Busy ──▶ Ready (successful navigation)
└──▶ Error (unrecoverable failure)Pages in the Error state can be cleaned up with PagePool::cleanup_error_pages.
The PoolStats snapshot is useful for monitoring and logging.
Structs§
- Page
Info - Metadata tracked for each page in the pool.
- Page
Pool - Thread-safe pool that tracks browser page states and enforces a capacity limit.
- Pool
Stats - Point-in-time snapshot of page pool utilisation.
Enums§
- Page
State - Lifecycle state of a pooled browser page.