made pool block until task completion to prevent memory problems