Skip to content

A few updates to SE-0471 isIsolatingCurrentContext #2801

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 4 commits into from
Apr 24, 2025

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Apr 22, 2025

SE review follow up, moving to a simpler model of detecting if we were able to determine the isolation without crashing.

ktoso added 2 commits April 23, 2025 08:54
SE review follow up, moving to a simpler model of detecting if we were able to determine the isolation without crashing.
@ktoso ktoso changed the title Update SE-0471 to return Bool? A few updates to SE-0471 isIsolatingCurrentContext Apr 24, 2025
@ktoso
Copy link
Contributor Author

ktoso commented Apr 24, 2025

```swift
func something(operation: @escaping @isolated(any) () -> ()) {
operation.isolation.withSerialExecutor { se in
if !se.isIsolatingCurrentContext() {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if !se.isIsolatingCurrentContext() {
if let knownIsolating = se.isIsolatingCurrentContext(), !knownIsolating {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missed to apply this change? @DougGregor

@DougGregor DougGregor merged commit 1f80c43 into swiftlang:main Apr 24, 2025
@ktoso ktoso deleted the patch-9 branch May 13, 2025 05: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