-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Concurrency] Updates after second SE pitch. #82456
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
Conversation
@swift-ci Please smoke test |
2a19c34
to
8c00ea0
Compare
@swift-ci Please smoke test |
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.
lgtm, sorry about the docs nitpicks! I don't actually have a great way to preview those in tree I guess 🤔
No worries. I think you're right about the doc comments; I'll go and update them all. |
38ead6d
to
262f07a
Compare
(Haven't updated doc comments yet; that's the next job…) |
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
ad9b463
to
c0adefc
Compare
@swift-ci Please test |
@swift-ci Please test Windows platform |
Linux looks like some WASI related problem, possibly to do with the cooperative executor? |
@swift-ci Please test |
@swift-ci Please test Windows platform |
1 similar comment
@swift-ci Please test Windows platform |
910770b
to
d795762
Compare
@swift-ci Please test |
@swift-ci please test Windows platform |
1 similar comment
@swift-ci please test Windows platform |
@swift-ci Please test Windows platform |
@swift-ci please test Windows platform |
d795762
to
972af40
Compare
(Rebased) |
@swift-ci Please test |
We no longer attempt to convert timestamps from the passed-in `Clock` in order to allow any clock to work with any executor. Instead, executors that do not recognise a clock should call the `enqueue` function on that `Clock`, which lets the `Clock` itself decide how to proceed. Additionally, rename `SchedulableExecutor` to `SchedulingExecutor`.
…cks. The built-in clocks should have implementations of `run` and `enqueue`, to allow derived clocks to call those implementations.
I don't think we actually need this. If you have a non-canonical (i.e. derived) clock, you can just implement `enqueue` and/or `run` and call those methods on the clock you're wrapping.
If a job enqueues another job on the executor, we might never leave the inner `while` loop in the `run()` method. Fix this by taking the contents of the run queue and only running those jobs in the queue at the time we enter the inner loop.
Add some documentation comments to the Dispatch and CF executors, and update the comments for the allocation and private data APIs.
Rather than just looking at top level in the module, start by searching the type marked as `@main`. This means that a library that provides a protocol or superclass that the `@main` type can conform to can specify an executor in a reasonable manner.
Also add `final` to the `CooperativeExecutor` declaration.
We've removed this code, so the test was failing.
…run. We were terminating after the first set of jobs; if one of them scheduled another job, and there were no timers running, we would terminate, which was wrong.
There was still some canonicalization in one of the tests, plus we needed to update the ABI tests.
This fixes some WASM tests.
Some mentions of `ExecutorJob` were not guarded by the required `SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY` condition.
fba50db
to
d6224d1
Compare
@swift-ci Please test |
We're changing our approach to
Clock
support in executors such that a clock that isn't recognised by an executor will result in a call to anenqueue
method onClock
itself; this will allow clocks to have control over exactly how they schedule jobs in cases where the executor doesn't already know what to do.Also includes a small bug fix for
CooperativeExecutor
and some updated comments.rdar://154191435