Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
names for event-loop threads and host-resolver thread
  • Loading branch information
graebm committed Oct 1, 2022
commit e08bfdb66d336d687ba038d939a4cb1df8c254b1
6 changes: 5 additions & 1 deletion source/event_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,17 @@ static struct aws_event_loop_group *s_event_loop_group_new(

struct aws_event_loop_options options = {
.clock = clock,
.thread_options = &thread_options,
};

if (pin_threads) {
thread_options.cpu_id = usable_cpus[i].cpu_id;
options.thread_options = &thread_options;
}

char thread_name[16] = {0};
snprintf(thread_name, sizeof(thread_name), "aws-io %d/%d", (int)i+1, (int)el_count);
thread_options.name = aws_byte_cursor_from_c_str(thread_name);

struct aws_event_loop *loop = new_loop_fn(alloc, &options, new_loop_user_data);

if (!loop) {
Expand Down
1 change: 1 addition & 0 deletions source/host_resolver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,7 @@ static inline int create_and_init_host_entry(

struct aws_thread_options thread_options = *aws_default_thread_options();
thread_options.join_strategy = AWS_TJS_MANAGED;
thread_options.name = aws_byte_cursor_from_c_str("aws-dns");

aws_thread_launch(&new_host_entry->resolver_thread, resolver_thread_fn, new_host_entry, &thread_options);
++default_host_resolver->pending_host_entry_shutdown_completion_callbacks;
Expand Down