aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-06-30 14:34:04 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-06-30 14:34:04 -0700
commitefe7a6e3380c9ddaa7d70b516fda281a441a7e7f (patch)
tree6a6cfe3cbbef93ef2f11cca123ff7e3447ddb6d1
parenta8a6857c46d45fab4f6a3885614c0cf191b9c669 (diff)
Use endpoint workqueue via execution context
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.c12
-rw-r--r--src/core/ext/transport/chttp2/transport/internal.h1
2 files changed, 2 insertions, 11 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
index 197cee7e0c..92722b50f4 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
@@ -204,8 +204,6 @@ static void destruct_transport(grpc_exec_ctx *exec_ctx,
gpr_free(ping);
}
- GRPC_WORKQUEUE_UNREF(exec_ctx, t->executor.workqueue, "transport");
-
gpr_free(t->peer_string);
gpr_free(t);
}
@@ -257,9 +255,6 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
/* ref is dropped at transport close() */
gpr_ref_init(&t->shutdown_ep_refs, 1);
gpr_mu_init(&t->executor.mu);
- GPR_ASSERT(GRPC_LOG_IF_ERROR(
- "workqueue_create",
- grpc_workqueue_create(exec_ctx, &t->executor.workqueue)));
t->peer_string = grpc_endpoint_get_peer(ep);
t->endpoint_reading = 1;
t->global.next_stream_id = is_client ? 1 : 2;
@@ -715,8 +710,8 @@ static void finish_global_actions(grpc_exec_ctx *exec_ctx,
set_write_state(t, GRPC_CHTTP2_WRITE_SCHEDULED, "unlocking");
REF_TRANSPORT(t, "initiate_writing");
gpr_mu_unlock(&t->executor.mu);
- grpc_workqueue_enqueue(exec_ctx, t->executor.workqueue,
- &t->initiate_writing, GRPC_ERROR_NONE);
+ grpc_exec_ctx_sched(exec_ctx, &t->initiate_writing, GRPC_ERROR_NONE,
+ grpc_endpoint_get_workqueue(t->ep));
break;
case GRPC_CHTTP2_WRITE_REQUESTED_NO_POLLER:
start_writing(exec_ctx, t);
@@ -2082,7 +2077,6 @@ static void add_to_pollset_locked(grpc_exec_ctx *exec_ctx,
grpc_chttp2_stream *s_unused, void *pollset) {
if (t->ep) {
grpc_endpoint_add_to_pollset(exec_ctx, t->ep, pollset);
- grpc_workqueue_add_to_pollset(exec_ctx, t->executor.workqueue, pollset);
}
}
@@ -2092,8 +2086,6 @@ static void add_to_pollset_set_locked(grpc_exec_ctx *exec_ctx,
void *pollset_set) {
if (t->ep) {
grpc_endpoint_add_to_pollset_set(exec_ctx, t->ep, pollset_set);
- grpc_workqueue_add_to_pollset_set(exec_ctx, t->executor.workqueue,
- pollset_set);
}
}
diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h
index 2ef1c9df7a..4e0c31c111 100644
--- a/src/core/ext/transport/chttp2/transport/internal.h
+++ b/src/core/ext/transport/chttp2/transport/internal.h
@@ -332,7 +332,6 @@ struct grpc_chttp2_transport {
struct {
gpr_mu mu;
- grpc_workqueue *workqueue;
/** is a thread currently in the global lock */
bool global_active;