1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! # Per-task admission policy
//!
//! Controller treats tasks as **slots** identified by `name`.
//! At any given time **one** task may run in a slot.
//! When a new request for the same slot arrives, the admission policy decides what to do.
//!
//! ## Variants
//!
//! - `DropIfRunning`: If the slot is already running, **ignore** the new request.
//! - `Replace`: **Stop** the running task (cancel/remove) and start the new one.
//! - `Queue`: **Enqueue** the new request (FIFO).
//!
//! ## Invariants
//!
//! - Tasks within the same slot never run in parallel (use dynamic names if you need parallel execution).
//! - Queued requests are executed strictly in submission order.
/// Policy controlling how new submissions are handled when a slot is busy.