-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Concurrency
-
None
-
Fully Compatible
-
Query 2020-03-09, Query 2020-03-23
This function blocks on a semaphore until a timeout is reached. In the case that we are not contending with other threads to acquire the semaphore, this function need not read the clock in order to calculate its deadline. Reading the clock can be expensive, so it would be beneficial to avoid this work in the common case.
This function is worth optimizing, since it's on the hot path for acquiring a global lock, which pretty much all database operations need to do.