The task call blocking method of the thread pool blocks for 10 minutes. If the KeepAliveTime of the thread pool is set to 3 minutes, will the task be reclaimed?

I have several tasks that need to be executed all the time. In the task, a method is called to get the value, blocking the attempt to get the value for 10 minutes, and then exit the thread if the value is not available 10 minutes later. These tasks are managed in the thread pool, while the KeepAliveTime of the thread pool is set to 3 minutes. When a task blocks getting a value, will the task be reclaimed by the thread pool?


KeepAliveTime is the maximum idle wait time of a thread when the number of threads is greater than coresize
blocking is not considered idle and will not be recycled

Menu