After reading through the documentation [here](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/server_administration_-_configuring_the_server/threads_pool/threads_pool), if you have the default settings, it looks like the thread remains in the pool till its expiration time, i.e. 10 mins. And the Sleep time, is how often Denodo will check all the unsued threads if they exceeded this expiration time, which is 5 mins. So, every 5 mins, Denodo will check what all threads have not been used for 10 mins and will close it.
If you want these threads not to remain in Denodo for long, you can tweak these settings, for example have Sleep time: 1 min, Expiration time: 2 mins. So no unused thread will remain in the pool for more than 2 mins.
But if you see many threads being opened and stuck anyways, I would also check how my queries are executing and if there are no BLOCKED threads firstly in my Denodo Server and if they do, are there any specific queries which are blocking my threads? Maybe at the data source level? And troubleshoot from there.
Hope this helps!