Patent ID: 9563474
Date: 2017-02-07
CPC Classifications: G06F

Claim:
1. A method for managing threads within an application, the method comprising: assigning, by a thread management computing device, a task to a current task queue based on one or more matching category when the new task is received within an application for execution; determining, by the thread management computing device, availability of one or more existing idle threads within one or more thread groups required for the execution of the received task within the application based on one or more utilization parameters, wherein the one or more utilization parameters includes a number of threads required for execution of the task, wherein each of the one or more thread groups is associated with one or more task queues and wherein the current task queue is one of the one or more task queues; determining, by the thread management computing device, when the number of one or more existing idle threads is less than a threshold number of idle threads required for execution and the determining further comprising obtaining the one or more existing idle threads from the one or more thread groups of a native task queue when the one or more existing idle threads is determined to be available in the one or more thread groups and when the number of existing one or more existing idle threads is determined to be less than the threshold number of idle threads required for execution, wherein the native task queue is one of the one or more task queues; configuring, by the thread management computing device, one or more characteristics of the obtained one or more existing idle threads from the native task queue based on the current task queue; allocating, by the thread management computing device, the configured one or more existing idle threads and the one or more existing idle threads for the execution of the received task within the current task queue; executing, by the thread management computing device, the task using the allocated one or more existing idle threads and the allocated configured one or more existing idle threads; determining, by the thread management computing device, for a presence of a new task in the native task queue after execution of the task within the current task queue; automatically deallocating, by the thread management computing device, the configured one or more existing idle threads from the current task queue when the new task in the native task queue is determined to be present; automatically reconfiguring, by the thread management computing device, the one or more characteristics of the deallocated one or more existing idle threads based on the native task queue; and automatically reallocating, by the thread management computing device, the reconfigured one or more existing idle threads for the execution of the new task in the native task queue.