Skip to content

Commit

Permalink
tag types for channel tasks (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
bretambrose authored Jul 1, 2019
1 parent 3d840da commit f62e9cc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
7 changes: 4 additions & 3 deletions source/h1_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1249,9 +1249,10 @@ static struct h1_connection *s_connection_new(struct aws_allocator *alloc, size_
/* 1 refcount for user */
aws_atomic_init_int(&connection->base.refcount, 1);

aws_channel_task_init(&connection->outgoing_stream_task, s_outgoing_stream_task, connection);
aws_channel_task_init(&connection->window_update_task, s_update_window_task, connection);
aws_channel_task_init(&connection->shutdown_delay_task, s_shutdown_delay_task, connection);
aws_channel_task_init(
&connection->outgoing_stream_task, s_outgoing_stream_task, connection, "http1_outgoing_stream");
aws_channel_task_init(&connection->window_update_task, s_update_window_task, connection, "http1_update_window");
aws_channel_task_init(&connection->shutdown_delay_task, s_shutdown_delay_task, connection, "http1_delay_shutdown");
aws_linked_list_init(&connection->thread_data.stream_list);
aws_linked_list_init(&connection->thread_data.midchannel_read_messages);

Expand Down
21 changes: 17 additions & 4 deletions source/websocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,23 @@ struct aws_websocket *aws_websocket_handler_new(const struct aws_websocket_handl

websocket->is_server = options->is_server;

aws_channel_task_init(&websocket->move_synced_data_to_thread_task, s_move_synced_data_to_thread_task, websocket);
aws_channel_task_init(&websocket->shutdown_channel_task, s_shutdown_channel_task, websocket);
aws_channel_task_init(&websocket->increment_read_window_task, s_increment_read_window_task, websocket);
aws_channel_task_init(&websocket->waiting_on_payload_stream_task, s_waiting_on_payload_stream_task, websocket);
aws_channel_task_init(
&websocket->move_synced_data_to_thread_task,
s_move_synced_data_to_thread_task,
websocket,
"websocket_move_synced_data_to_thread");
aws_channel_task_init(
&websocket->shutdown_channel_task, s_shutdown_channel_task, websocket, "websocket_shutdown_channel");
aws_channel_task_init(
&websocket->increment_read_window_task,
s_increment_read_window_task,
websocket,
"websocket_increment_read_window");
aws_channel_task_init(
&websocket->waiting_on_payload_stream_task,
s_waiting_on_payload_stream_task,
websocket,
"websocket_waiting_on_payload_stream");

aws_linked_list_init(&websocket->thread_data.outgoing_frame_list);

Expand Down

0 comments on commit f62e9cc

Please sign in to comment.