Thread-Safe Counter Class with Sleeping Callback
Implement a multithreaded class in C++ (the test cases below simulate it with a Python version).
Requirements:
- The class has a callback (written as a lambda in C++) that increments an internal coun...
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:
