make threadpool size configurable