wso2-dev/andes — pull request #113 by hastef88 (2014-10-21 03:48:52+00:00)
Title: avoid continous blocking from the thread cleanup wait loop

Modified code block previously waited infinitely until the thread pool reaches a safe threshold (e.g. 1000) from MAX (5000). Even though chances are less for the thread pool to not clear up for a long time, since it occurs in current build, I have updated the loop to give up after 5 attempts to avoid blocking other tasks.(THREADPOOL_RECOVERY_ATTEMPTS)