Constructor
Check if the total number of active tasks is below the desired limit to resume.
Check if the total number of active tasks has reached the desired limit to suspend.
Reference to the throttled pool
When amount of total queued tasks is <= this value, the input will be resumed.
When amount of total queued tasks is >= this value, the input will be suspended.
String representation of the class name of the task handled by the host task pool.
Adds a suspendable to the list of suspendables which are to be throttled if it's not already in there. Also ensures that the state of the added suspendable is consistent with the state of the throttler.
Removes a suspendable from the list of suspendables if it exists.
Clears the list of suspendables.
Checks if the suspend limit has been reached and the suspendables need to be suspended.
Checks if resume limit has been reached and the suspendables need to be resumed.
Decides whether the suspendables should be suspended. Called by throttledSuspend() when not suspended.
Decides whether the suspendables should be resumed. Called by throttledResume() when suspended.
Throttler implementation intended to be used with a specialized task pools.