|
|
@ -58,6 +58,10 @@ TEST(LibuvEventManager, ShutdownRefAsync) { |
|
|
|
for (int j = 0; j < i; j++) { |
|
|
|
for (int j = 0; j < i; j++) { |
|
|
|
em->ShutdownRef(); |
|
|
|
em->ShutdownRef(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// TSAN doesn't like this approach although this would work. TSAN considers
|
|
|
|
|
|
|
|
// it dangerous to have a destructor being called while its member function
|
|
|
|
|
|
|
|
// is called but LibuvEventManager handles this by making LibuvEventManager
|
|
|
|
|
|
|
|
// wait until all pending operations finish.
|
|
|
|
grpc_core::Thread deleter( |
|
|
|
grpc_core::Thread deleter( |
|
|
|
"deleter", [](void* em) { delete static_cast<LibuvEventManager*>(em); }, |
|
|
|
"deleter", [](void* em) { delete static_cast<LibuvEventManager*>(em); }, |
|
|
|
em); |
|
|
|
em); |
|
|
|