Thread-Safe Cache with Lock and Condition Variable (Single-Flight per Key)
Problem: Implement a Thread-Safe Cache Using Locks and Condition Variables
You are given an existing cache code skeleton:
- The cache stores
key -> value. - When
get(key)is called:- If `k...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
