Multithreading pool resource closing fix
Merge pull request #1480 from gmandnepr/master

Multithreading pool resource fix