diff options
author | 2018-03-01 11:36:47 -0800 | |
---|---|---|
committer | 2018-03-01 11:47:36 -0800 | |
commit | 2fe87b09055cd256cdce038c4c70d92b955c991b (patch) | |
tree | a7652e9285797130e4d4ece7a6f271530be4b14f /src/core/lib/iomgr/timer_manager.cc | |
parent | 8ffa1ae93310646cdf1b15c3a8c2655268d1a47f (diff) |
Move assignment for Thread, make destructor optional, loop cv waits
Diffstat (limited to 'src/core/lib/iomgr/timer_manager.cc')
-rw-r--r-- | src/core/lib/iomgr/timer_manager.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/lib/iomgr/timer_manager.cc b/src/core/lib/iomgr/timer_manager.cc index 7efbaa8364..94f288af27 100644 --- a/src/core/lib/iomgr/timer_manager.cc +++ b/src/core/lib/iomgr/timer_manager.cc @@ -19,7 +19,6 @@ #include <grpc/support/port_platform.h> #include <inttypes.h> -#include <new> #include <grpc/support/alloc.h> #include <grpc/support/log.h> @@ -69,7 +68,6 @@ static void gc_completed_threads(void) { gpr_mu_unlock(&g_mu); while (to_gc != nullptr) { to_gc->thd.Join(); - to_gc->thd.~Thread(); completed_thread* next = to_gc->next; gpr_free(to_gc); to_gc = next; @@ -88,7 +86,7 @@ static void start_timer_thread_and_unlock(void) { } completed_thread* ct = static_cast<completed_thread*>(gpr_malloc(sizeof(*ct))); - new (&ct->thd) grpc_core::Thread("grpc_global_timer", timer_thread, ct); + ct->thd = grpc_core::Thread("grpc_global_timer", timer_thread, ct); ct->thd.Start(); } |