Skip to content

Implement a simple library for task cancellation and status management #34198

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

Merged
merged 2 commits into from
Oct 15, 2020

Conversation

rjmccall
Copy link
Contributor

@rjmccall rjmccall commented Oct 6, 2020

There are things about this that I'm far from sold on. In particular, I'm concerned that in order to implement escalation correctly, we're going to have to add a status record for the fact that the task is being executed, which means we're going
to have to potentially wait to acquire the status lock; overall, that means making an extra runtime function call and doing some
atomics whenever we resume or suspend a task, which is an uncomfortable amount of overhead.

The testing here is pretty grossly inadequate, but I wanted to lay down the groundwork.

@rjmccall
Copy link
Contributor Author

rjmccall commented Oct 6, 2020

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Oct 6, 2020

Build failed
Swift Test OS X Platform
Git Sha - a53504f2772743f3f8761e120f3e52a4bcc62e41

@swift-ci
Copy link
Contributor

swift-ci commented Oct 6, 2020

Build failed
Swift Test Linux Platform
Git Sha - a53504f2772743f3f8761e120f3e52a4bcc62e41

@rjmccall
Copy link
Contributor Author

rjmccall commented Oct 7, 2020

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Oct 7, 2020

Build failed
Swift Test OS X Platform
Git Sha - 83a980744072d6a8f0db92f0088202bb387a85e5

@swift-ci
Copy link
Contributor

swift-ci commented Oct 7, 2020

Build failed
Swift Test Linux Platform
Git Sha - 83a980744072d6a8f0db92f0088202bb387a85e5

@rjmccall
Copy link
Contributor Author

rjmccall commented Oct 8, 2020

@swift-ci Please test

@rjmccall
Copy link
Contributor Author

rjmccall commented Oct 8, 2020

@swift-ci Please test Windows

@swift-ci
Copy link
Contributor

swift-ci commented Oct 8, 2020

Build failed
Swift Test Linux Platform
Git Sha - f57504272ae3fdf40069cdc46074fe26647e95b0

@rjmccall
Copy link
Contributor Author

@swift-ci Please test

@rjmccall
Copy link
Contributor Author

@swift-ci Please test Windows platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 9d3e18f5fdfd0101c83c542d078a9917f3e2602a

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 9d3e18f5fdfd0101c83c542d078a9917f3e2602a

@rjmccall rjmccall force-pushed the task-library branch 2 times, most recently from 4429bcb to 0e71ef3 Compare October 14, 2020 03:00
@rjmccall
Copy link
Contributor Author

@swift-ci Please test.

@rjmccall
Copy link
Contributor Author

@swift-ci Please test Windows platform.

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 0e71ef364325cd1a1be50678741ebec548372f5f

@rjmccall
Copy link
Contributor Author

@swift-ci Please test.

@rjmccall
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 59a34b752b1fc2c4f565584a7853c9efa10d6c8f

@rjmccall
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 2a92ba844fbceaaa60d3cd5770c41adab3bbb6fd

There are things about this that I'm far from sold on.  In
particular, I'm concerned that in order to implement escalation
correctly, we're going to have to add a status record for the
fact that the task is being executed, which means we're going
to have to potentially wait to acquire the status lock; overall,
that means making an extra runtime function call and doing some
atomics whenever we resume or suspend a task, which is an
uncomfortable amount of overhead.

The testing here is pretty grossly inadequate, but I wanted to
lay down the groundwork here.
@rjmccall
Copy link
Contributor Author

@swift-ci Please test.

@rjmccall
Copy link
Contributor Author

Note that this includes a change that I'm landing separately as #34302.

@rjmccall rjmccall merged commit 7bc019e into swiftlang:main Oct 15, 2020
@rjmccall rjmccall deleted the task-library branch October 15, 2020 17:11
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.

2 participants