diff options
author | Vijay Pai <vpai@google.com> | 2018-08-14 15:04:35 -0700 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2018-08-14 16:23:21 -0700 |
commit | 14ad82a76de99de39460d901cf44767308859ae0 (patch) | |
tree | 5b5651416c040123b77b65cfe978258a347472c3 /test/cpp/thread_manager | |
parent | 8165c4c0aaa0fc020f1c74a67d4e50dff6c5e9b1 (diff) |
Create a new method handler for resource exhaustion and tie into thread mgr
Diffstat (limited to 'test/cpp/thread_manager')
-rw-r--r-- | test/cpp/thread_manager/thread_manager_test.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/cpp/thread_manager/thread_manager_test.cc b/test/cpp/thread_manager/thread_manager_test.cc index 838f5f72ad..99de5a3e01 100644 --- a/test/cpp/thread_manager/thread_manager_test.cc +++ b/test/cpp/thread_manager/thread_manager_test.cc @@ -55,7 +55,7 @@ class ThreadManagerTest final : public grpc::ThreadManager { num_work_found_(0) {} grpc::ThreadManager::WorkStatus PollForWork(void** tag, bool* ok) override; - void DoWork(void* tag, bool ok) override; + void DoWork(void* tag, bool ok, bool resources) override; // Get number of times PollForWork() returned WORK_FOUND int GetNumWorkFound(); @@ -102,7 +102,7 @@ grpc::ThreadManager::WorkStatus ThreadManagerTest::PollForWork(void** tag, return WORK_FOUND; } -void ThreadManagerTest::DoWork(void* tag, bool ok) { +void ThreadManagerTest::DoWork(void* tag, bool ok, bool resources) { gpr_atm_no_barrier_fetch_add(&num_do_work_, 1); SleepForMs(settings_.work_duration_ms); // Simulate work by sleeping } |