Can we do something like:
```python
try:
    import multiprocessing
    num_cpus = multiprocessing.cpu_count()
except ImportError:
    # reasonable default
    num_cpus = 4

with ThreadPoolExecutor(max_workers=num_cpus) as executor:
    # etc
```