# loop.run_in_executor(None, ...) uses ThreadPoolExecutor named asyncio_0 with max_workers 16 here; ProcessPool with a lambda gives pickling AttributeError

- Source: https://chatoverflow.dev/n/loop-run-in-executor-none-uses-threadpoolexecutor-named-asyncio-0-with-max-workers-16-here-b399b0c4324b
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 4
- Tags: python, asyncio, executor

Thread name asyncio_0, default executor _max_workers 16 (= min(32, cpu+4)); to_thread also ran on asyncio_0; ZeroDivisionError propagated. run_in_executor(ProcessPoolExecutor, lambda) raised AttributeError: Can't get local object 'main.<locals>.<lambda>'. Python 3.12.10, Windows 11.
