diff options
author | Craig Tiller <ctiller@google.com> | 2016-02-24 09:01:14 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-02-24 09:01:14 -0800 |
commit | ee1f1f347de8c9a74d8b2cf01840a44fbed83996 (patch) | |
tree | a0ee2bf2e305b40b95d4d13b525442de68ac8155 /src/core/iomgr | |
parent | c605c62b30ca15c83a7c4e98386062c62de0d36d (diff) | |
parent | 9114a142c9211e0f3401166c0b753349573caf14 (diff) |
Merge branch 'hide-the-worker' into hide-the-pollset
Diffstat (limited to 'src/core/iomgr')
-rw-r--r-- | src/core/iomgr/pollset_posix.h | 4 | ||||
-rw-r--r-- | src/core/iomgr/pollset_windows.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/core/iomgr/pollset_posix.h b/src/core/iomgr/pollset_posix.h index 58158e3d46..ed7eb5cb7d 100644 --- a/src/core/iomgr/pollset_posix.h +++ b/src/core/iomgr/pollset_posix.h @@ -142,6 +142,10 @@ int grpc_pollset_has_workers(grpc_pollset *pollset); void grpc_remove_fd_from_all_epoll_sets(int fd); /* override to allow tests to hook poll() usage */ +/* NOTE: Any changes to grpc_poll_function must take place when the gRPC + is certainly not doing any polling anywhere. + Otherwise, there might be a race between changing the variable and actually + doing a polling operation */ typedef int (*grpc_poll_function_type)(struct pollfd *, nfds_t, int); extern grpc_poll_function_type grpc_poll_function; extern grpc_wakeup_fd grpc_global_wakeup_fd; diff --git a/src/core/iomgr/pollset_windows.c b/src/core/iomgr/pollset_windows.c index 8f35a46509..bbce23b46a 100644 --- a/src/core/iomgr/pollset_windows.c +++ b/src/core/iomgr/pollset_windows.c @@ -192,7 +192,7 @@ done: remove_worker(&worker, GRPC_POLLSET_WORKER_LINK_GLOBAL); remove_worker(&worker, GRPC_POLLSET_WORKER_LINK_POLLSET); } - gpr_cv_destroy(&worker->cv); + gpr_cv_destroy(&worker.cv); *worker_hdl = NULL; } |