Skip to content

Commit

Permalink
update caller's thread changes
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Sep 26, 2024
1 parent 0918e76 commit a55f14f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions source/event_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,21 +482,13 @@ size_t aws_event_loop_get_load_factor(struct aws_event_loop *event_loop) {
return aws_atomic_load_int(&event_loop->current_load_factor);
}

// As dispatch queue has ARC support, we could directly release the dispatch queue event loop. Disable the
// caller thread validation on dispatch queue.
#ifndef AWS_USE_DISPATCH_QUEUE
# define AWS_EVENT_LOOP_NOT_CALLER_THREAD(eventloop) AWS_ASSERT(!aws_event_loop_thread_is_callers_thread(eventloop));
#else
# define AWS_EVENT_LOOP_NOT_CALLER_THREAD(eventloop)
#endif

void aws_event_loop_destroy(struct aws_event_loop *event_loop) {
if (!event_loop) {
return;
}

AWS_ASSERT(event_loop->vtable && event_loop->vtable->destroy);
AWS_EVENT_LOOP_NOT_CALLER_THREAD(event_loop);
AWS_ASSERT(!aws_event_loop_thread_is_callers_thread(event_loop));

event_loop->vtable->destroy(event_loop);
}
Expand Down

0 comments on commit a55f14f

Please sign in to comment.