You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: custom_worker_tuner/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ A `CustomSlotSupplier` is a sample that lets you gate slot grants on whatever yo
4
4
This sample gates on a fake DB pool: the worker only polls for a new
5
5
activity when the pool has a free connection.
6
6
7
+
**Note:** This sample is illustrative only. It shouldn't be used for production grade use-cases.
8
+
7
9
## What this sample is
8
10
db_pool.py - A static-capacity counter. Pretends to be a DB pool. Two methods: increment() (claim a slot, returns False if full), decrement() (release)
9
11
supplier.py - The custom slot supplier. On reserve_slot it polls downstream.increment() until it succeeds. On release_slot it calls downstream.decrement()
0 commit comments