Skip to main content

Module page_pool

Module page_pool 

Source
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§

PageInfo
Metadata tracked for each page in the pool.
PagePool
Thread-safe pool that tracks browser page states and enforces a capacity limit.
PoolStats
Point-in-time snapshot of page pool utilisation.

Enums§

PageState
Lifecycle state of a pooled browser page.