aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/wakeup_fd_cv.h
diff options
context:
space:
mode:
authorGravatar Ken Payson <kpayson@google.com>2016-12-06 12:18:28 -0800
committerGravatar Ken Payson <kpayson@google.com>2017-02-06 15:26:03 -0800
commit16b39d6e6a558ff0723e9db582b71df1bfc3db10 (patch)
treef0cc7e1c8653b7dba1cec966555ec6bb71d21f62 /src/core/lib/iomgr/wakeup_fd_cv.h
parent94298fbb955c1bc059e75f4c8c82f252c1cfeae9 (diff)
Cache poll threads in the poll-cv engine.
This decreases the number of threads spawned by several orders of magnitude in some scenarios.
Diffstat (limited to 'src/core/lib/iomgr/wakeup_fd_cv.h')
-rw-r--r--src/core/lib/iomgr/wakeup_fd_cv.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/lib/iomgr/wakeup_fd_cv.h b/src/core/lib/iomgr/wakeup_fd_cv.h
index ac16be1750..5c93b28ef0 100644
--- a/src/core/lib/iomgr/wakeup_fd_cv.h
+++ b/src/core/lib/iomgr/wakeup_fd_cv.h
@@ -58,6 +58,7 @@
typedef struct cv_node {
gpr_cv* cv;
struct cv_node* next;
+ struct cv_node* prev;
} cv_node;
typedef struct fd_node {
@@ -68,9 +69,8 @@ typedef struct fd_node {
typedef struct cv_fd_table {
gpr_mu mu;
- int pollcount;
- int shutdown;
- gpr_cv shutdown_complete;
+ gpr_refcount pollcount;
+ gpr_cv shutdown_cv;
fd_node* cvfds;
fd_node* free_fds;
unsigned int size;