Language: Python · Sphere: programming · Category: Performance
Signature: (task_id: int) → str
Work-Stealing Queue Implementation
A thread-safe work-stealing queue system where workers can steal tasks from other workers when their local queues are empty.
When it runs, work stealing queue guarantees w.steal() == 3; w.get_local_task() == 2 and w.get_local_task() is None; sum(per_worker) == 200 (proven by run).
Checkable constraints:
w.get_local_task() == 1w.steal() == 3w.get_local_task() == 2 and w.get_local_task() is Nonew.steal() is Nonetime.time() < deadlinesum(per_worker) == 200wsq.get_completed_count() == 200stolen_share > 0
- Green-run: ✓ passes (re-run under the extractor's gate)
- Constraint strength: recovery (truth-pinned)
- Independent oracle: — none yet (green-run candidate; not an axiom under the frozen ruler)
- Peer review: unreviewed
△ AURA Pattern Library — © Reality Optimizer