Skip to content

Commit 4854b69

Browse files
dprevoznikclaude
andcommitted
docs(pools): note pools should be declared outside workload runtime in examples
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent bed3e27 commit 4854b69

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

browsers/pools/overview.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,10 @@ A profile attached to the pool config is [read-only](#create-a-pool-of-reserved-
277277

278278
<CodeGroup>
279279
```typescript Typescript/Javascript
280-
// Create the pool once, with no profile attached
280+
// Declare the pool once, separately from your workload runtime, with no profile attached
281281
const pool = await kernel.browserPools.create({ name: "my-pool", size: 10 });
282282

283-
// Then, per user:
283+
// Later, at runtime, acquire from the pool per user:
284284
const browser = await kernel.browserPools.acquire("my-pool", {});
285285

286286
// Load this user's profile and persist any changes on destroy
@@ -298,10 +298,10 @@ await kernel.browserPools.release("my-pool", {
298298
```
299299

300300
```python Python
301-
# Create the pool once, with no profile attached
301+
# Declare the pool once, separately from your workload runtime, with no profile attached
302302
pool = kernel.browser_pools.create(name="my-pool", size=10)
303303

304-
# Then, per user:
304+
# Later, at runtime, acquire from the pool per user:
305305
browser = kernel.browser_pools.acquire("my-pool")
306306

307307
# Load this user's profile and persist any changes on destroy
@@ -321,7 +321,8 @@ kernel.browser_pools.release(
321321
```
322322

323323
```go Go
324-
// Acquire a browser from a profile-free pool
324+
// Declare the pool once, separately from your workload runtime, with no profile attached.
325+
// Later, at runtime, acquire from the pool per user:
325326
browser, err := client.BrowserPools.Acquire(ctx, "my-pool", kernel.BrowserPoolAcquireParams{})
326327
if err != nil {
327328
panic(err)

0 commit comments

Comments
 (0)