Loading...
Loading...
Found 3 Skills
Use when designing or reviewing concurrent Python code — selecting between asyncio, threads, or multiprocessing; structuring cancellation and deadline propagation; bounding fan-out and backpressure. Also use when diagnosing race conditions, deadlocks, slow throughput, or thread/task leaks under load.
Subprocess and concurrency discipline for Python: how to run external programs safely, and how to pick the right concurrency model instead of the habitual one. Use when spawning processes with subprocess or asyncio subprocesses, writing threading or ThreadPoolExecutor code, using multiprocessing or ProcessPoolExecutor, sizing worker pools, bounding fan-out, or diagnosing deadlocks, hangs, orphaned children, and zombie processes. Covers argv vs shell, timeouts that kill the whole process tree, pipe deadlocks, start methods (spawn/forkserver/fork), pickling limits, GIL and free-threading, and cancellation. For event-loop and coroutine rules (TaskGroup, blocking calls, cancellation), use python-async-best-practices instead.
This skill should be used at the start of any computationally intensive scientific task to detect and report available system resources (CPU cores, GPUs, memory, disk space). It creates a JSON file with resource information and strategic recommendations that inform computational approach decisions such as whether to use parallel processing (joblib, multiprocessing), out-of-core computing (Dask, Zarr), GPU acceleration (PyTorch, JAX), or memory-efficient strategies. Use this skill before running analyses, training models, processing large datasets, or any task where resource constraints matter.