Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
3.0
-
Security Level: Public
-
None
Description
whenever we invoke ExecutorPool API, we should grab the two or three locks. For example, ExecutorPool::schedule API requires grabbing two locks (one for ExecutorPool and the other for TaskQueue). We don't need to grab two locks for scheduling a task. ExecutorPool::snooze API even requires grabbing three locks.
We should avoid gabbing more than one lock in a single thread if possible because it might cause a deadlock issue.