1. A method for controlling priority of dynamic compilation by a computer system, the method comprising: executing a task by using a thread pooled in a thread pool; monitoring a metric related to the dynamic compilation; determining whether the metric meets a predetermined criterion; and causing a lowering of priority of the thread in returning of the thread to the thread pool for next execution by a processor if the metric is determined to meet the predetermined criterion.