Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR change pass. #704

Merged
merged 34 commits into from
Feb 5, 2025
Merged

PR change pass. #704

merged 34 commits into from
Feb 5, 2025

Conversation

sbSteveK
Copy link
Contributor

@sbSteveK sbSteveK commented Jan 24, 2025

Changes:

  • Remove two mutex locks and use a singular lock to reduce probability of deadlocks and simplify logic around shared data between threads.
  • Shutdown/cleanup restructure
  • Added storage of parent elg to aws_dispatch_loop.
  • More error reporting and logging for clarity.
  • Add comments wherever applicable and especially around Apple API.
  • Post-test sleep for dispatch queue for memory cleanup.
  • Bug fixes.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 46.15385% with 14 lines in your changes missing coverage. Please review.

Project coverage is 79.59%. Comparing base (fdb053b) to head (eef0d7c).
Report is 169 commits behind head on grand_dispatch_queue.

Files with missing lines Patch % Lines
source/event_loop.c 57.14% 9 Missing ⚠️
source/linux/epoll_event_loop.c 0.00% 5 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                    @@
##           grand_dispatch_queue     #704      +/-   ##
========================================================
- Coverage                 79.69%   79.59%   -0.11%     
========================================================
  Files                        30       30              
  Lines                      6117     6126       +9     
========================================================
+ Hits                       4875     4876       +1     
- Misses                     1242     1250       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sbSteveK sbSteveK marked this pull request as ready for review February 4, 2025 17:24
aws_mutex_init(&dispatch_loop->synced_data.synced_data_lock);

/* The dispatch queue is suspended at this point. */
dispatch_loop->synced_data.suspended = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be necessary as we already called dispatch_suspend(dispatch_loop->dispatch_queue); above.

struct dispatch_loop_context *dispatch_queue_context = entry->dispatch_queue_context;
s_release_dispatch_loop_context(dispatch_queue_context);

/* Cleans up a `scheduled_iteration_entry` */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably wanna clarify that the destroy function will only release the memory of the entry. The caller should make sure to remove the priority_queue_node from its queue.

@xiazhvera xiazhvera merged commit 87ac13d into grand_dispatch_queue Feb 5, 2025
44 of 49 checks passed
@xiazhvera xiazhvera deleted the grand_dispatch_queue_edit branch February 5, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants