diff options
author | 2016-12-06 12:18:28 -0800 | |
---|---|---|
committer | 2017-02-06 15:26:03 -0800 | |
commit | 16b39d6e6a558ff0723e9db582b71df1bfc3db10 (patch) | |
tree | f0cc7e1c8653b7dba1cec966555ec6bb71d21f62 /src/core/lib/iomgr/wakeup_fd_cv.h | |
parent | 94298fbb955c1bc059e75f4c8c82f252c1cfeae9 (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.h | 6 |
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; |