port thread pool patch to PSI 4.0b4, and use it to fix 'hanging' tests
Merge pull request #471 from boegel/PSI-4.0b_thread-pool_patch

port thread pool patch to PSI 4.0b4, and use it to fix 'hanging' tests