-
Notifications
You must be signed in to change notification settings - Fork 62
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
Grand dispatch queue #661
base: runtime_select_event_loop
Are you sure you want to change the base?
Grand dispatch queue #661
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## runtime_select_event_loop #661 +/- ##
=============================================================
- Coverage 79.66% 79.65% -0.01%
=============================================================
Files 30 30
Lines 6121 6123 +2
=============================================================
+ Hits 4876 4877 +1
- Misses 1245 1246 +1 ☔ View full report in Codecov by Sentry. |
…io into grand_dispatch_queue
…io into grand_dispatch_queue
…io into grand_dispatch_queue
…io into grand_dispatch_queue
…io into grand_dispatch_queue
…io into grand_dispatch_queue
…io into grand_dispatch_queue
…io into grand_dispatch_queue
…io into grand_dispatch_queue
…io into grand_dispatch_queue
struct aws_string *dispatch_queue_id; | ||
|
||
/* Synced data handle cross thread tasks and events, and event loop operations*/ | ||
struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this block separate from synced_thread_data? Does the lock in synced_thread_data guard this too? I would not split them like this
} | ||
|
||
// Iteration function that scheduled and executed by the Dispatch Queue API | ||
static void s_run_iteration(void *context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The locking here seems a little unnecessarily complex. If you look at a single call to s_run_iteration:
lock(context)
unlock(context)
lock(context) // via begin_iteration, also this seems wrong as you're slurping cross-thread tasks which should be protected by lock(loop) instead
unlock(context) // via begin_iteration
lock(loop)
set thread id/execution
unlock(loop)
run all tasks
lock(loop)
executing = false
unlock(loop)
lock(context) // via end_iteration, again this appears wrong since you access lock(loop) protected data here
unlock(context)
…io into grand_dispatch_queue
…io into grand_dispatch_queue
Integration of Apple's grand dispatch queue with event loop
The CI is failing for dispatch queue because of the apple network socket is not in. The socket related changes is in PR: #662
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.