Previously shutdown() only joined the scheduler loop thread. Batch worker threads (which decrement _reserved_vram in their finally block) could still be running when shutdown returned, leaving stale VRAM accounting. Now snapshots active workers under lock and joins them all. Snapshot-then-join pattern avoids holding the lock across blocking join calls (which would deadlock since workers acquire the same lock on exit). |
||
|---|---|---|
| .. | ||
| config | ||
| db | ||
| llm | ||
| pipeline | ||
| resources | ||
| tasks | ||
| tiers | ||
| vision | ||
| wizard | ||
| __init__.py | ||