-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Port the benchmark harness to async mode and add an initial AsyncSequence benchmark #36923
base: main
Are you sure you want to change the base?
Port the benchmark harness to async mode and add an initial AsyncSequence benchmark #36923
Conversation
|
@swift-ci please benchmark |
| main() | ||
| if #available(macOS 9999, *) { | ||
|
|
||
| Task.runDetached { |
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.
Task.runDetached is now detach
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.
Unfortunately detach was incorrectly marked not static in the compiler I'm using
| exit(0) | ||
| } | ||
|
|
||
| sleep(100000) |
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.
If you have control over how this gets compiled and can pass parse-as-library to the invocation, wrapping the detached run in
@main struct Main {
static func main() async {
// The code
}
}
will give you an async context that you can await on instead of sleeping for a kajillion moments.
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.
As a temporary workaround you can use runAsyncAndBlock
|
@swift-ci please benchmark |
This reverts commit 5d805c235c10a7df12f8795e4f82d4d120d2f39d.
dc9e169
to
4e83022
Compare
|
@swift-ci please test |
|
@swift-ci please benchmark |
|
Build failed |
(cherry picked from commit 477b4a8008c7418afaf17fe334b361f4e6b97304)
(cherry picked from commit fad8fd0007449c2f37a69650b415ff12c9734855)
|
@swift-ci please test |
|
@swift-ci please benchmark |
|
Build failed |
|
@swift-ci please benchmark |
No description provided.