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
Replace asyncio chunk prefetcher with plain concurrent.futures
The iter_disk prefetcher (used by the UDF and numexpr fallback engines
when all operands are NDArrays and at least one is on disk) used an
asyncio event loop only to gather ThreadPoolExecutor futures. Submit
the per-operand get_chunk tasks directly and collect them with
future.result(), which preserves operand order and propagates the
first exception naturally.
This drops the asyncio import altogether: `import blosc2` no longer
pulls in ~30 asyncio modules, saving ~3 MB of memory footprint at
import time.
Also fix a latent deadlock: when an exception during evaluation closed
the chunk iterator early, the generator finalizer blocked forever in
thread.join() while the reader thread was stuck in queue.put() on the
full prefetch queue. A stop event now makes the producer bail out
when its consumer goes away.
0 commit comments