Skip to content

Commit

Permalink
more comments and format clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Sep 11, 2024
1 parent 287094f commit bd58da0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/aws/io/event_loop.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ struct aws_event_loop_group {
struct aws_shutdown_callback_options shutdown_options;
};

typedef struct aws_event_loop *(
aws_new_system_event_loop_fn)(struct aws_allocator *alloc, const struct aws_event_loop_options *options);
typedef struct aws_event_loop *(aws_new_system_event_loop_fn)(struct aws_allocator *alloc,
const struct aws_event_loop_options *options);

struct aws_event_loop_configuration {
enum aws_event_loop_style style;
Expand Down
4 changes: 2 additions & 2 deletions include/aws/io/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ struct aws_io_handle {
void *handle;
} data;
void *additional_data;
#if AWS_USE_DISPATCH_QUEUE
#if AWS_USE_DISPATCH_QUEUE
aws_io_set_queue_on_handle_fn *set_queue;
aws_io_clear_queue_on_handle_fn *clear_queue;
#endif /* AWS_USE_DISPATCH_QUEUE */
#endif /* AWS_USE_DISPATCH_QUEUE */
};

enum aws_io_message_type {
Expand Down
6 changes: 5 additions & 1 deletion source/darwin/dispatch_queue_event_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,10 @@ static int s_unsubscribe_from_io_events(struct aws_event_loop *event_loop, struc
return AWS_OP_SUCCESS;
}

// The dispatch queue will assign the task block to threads, we will threat all
// tasks as cross thread tasks. Ignore the caller thread verification for apple
// dispatch queue.
static bool s_is_on_callers_thread(struct aws_event_loop *event_loop) {
(void)event_loop;
return true;
}
}

0 comments on commit bd58da0

Please sign in to comment.