aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/iomgr_posix_cfstream.cc
diff options
context:
space:
mode:
authorGravatar Guantao Liu <guantaol@google.com>2018-11-19 12:31:21 -0800
committerGravatar Guantao Liu <guantaol@google.com>2018-11-19 12:31:21 -0800
commitbe5eea1f42de9cc108d589361783b9996024ffd3 (patch)
tree6041be5a0064e42b1f43472860d4d9fa42862d6d /src/core/lib/iomgr/iomgr_posix_cfstream.cc
parent168965b2c21f0ebfc9a81bec4aaff87acf064326 (diff)
Extend ev_posix.* to prepare for the new background poller 'epollbg',
and get rid of the dependency loop on the grpc shutdown path. Make sure all background closures are complete before shutting down the other grpc modules. Avoid using the backup poller in TCP endpoints if using the background poller.
Diffstat (limited to 'src/core/lib/iomgr/iomgr_posix_cfstream.cc')
-rw-r--r--src/core/lib/iomgr/iomgr_posix_cfstream.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/iomgr_posix_cfstream.cc b/src/core/lib/iomgr/iomgr_posix_cfstream.cc
index 235a9e0712..552ef4309c 100644
--- a/src/core/lib/iomgr/iomgr_posix_cfstream.cc
+++ b/src/core/lib/iomgr/iomgr_posix_cfstream.cc
@@ -54,8 +54,13 @@ static void iomgr_platform_shutdown(void) {
grpc_wakeup_fd_global_destroy();
}
+static void iomgr_platform_shutdown_background_closure(void) {
+ grpc_shutdown_background_closure();
+}
+
static grpc_iomgr_platform_vtable vtable = {
- iomgr_platform_init, iomgr_platform_flush, iomgr_platform_shutdown};
+ iomgr_platform_init, iomgr_platform_flush, iomgr_platform_shutdown,
+ iomgr_platform_shutdown_background_closure};
void grpc_set_default_iomgr_platform() {
char* enable_cfstream = getenv(grpc_cfstream_env_var);