thread-pool: avoid passing the pool parameter every time