Skip to content

[Concurrency] Fix too eager early return in checkIsolation mode detecting #73495

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
May 9, 2024

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented May 7, 2024

Description: If we have the ability to check env variables, and there was no env variable set we aggressively bailed out of the function's logic, without setting the executor mode at all. This prevented the dynamic modes from working in real (non testing) scenarios.

Thanks to @mikeash for helping spot the silly mistake

Resolves rdar://127400013

@ktoso
Copy link
Contributor Author

ktoso commented May 7, 2024

@swift-ci please smoke test

…ting

If we have the ability to check env variables, and there was no env
variable set we aggressively bailed out of the function's logic, without
setting the executor mode at all. This prevented the dynamic modes from
working in real (non testing) scenarios.

Resolves rdar://127400013
@ktoso ktoso force-pushed the wip-fix-checkIsCurrentExecutorMode branch from 1d47137 to 6bb72e5 Compare May 8, 2024 03:17
@ktoso
Copy link
Contributor Author

ktoso commented May 8, 2024

@swift-ci please smoke test

@ktoso ktoso requested a review from al45tair as a code owner May 8, 2024 14:28
@ktoso
Copy link
Contributor Author

ktoso commented May 8, 2024

This was a pain but made use now of the proper env-var way to declare these env vars -- solution was silly but took a while to find. This is much cleaner now and will show up in help advice. The option exists only for us in testing really, but it's good to document it properly.

@ktoso
Copy link
Contributor Author

ktoso commented May 8, 2024

@swift-ci please smoke test

@ktoso ktoso requested a review from a team as a code owner May 9, 2024 07:21
@ktoso
Copy link
Contributor Author

ktoso commented May 9, 2024

@swift-ci please smoke test

@ktoso ktoso merged commit b2bd176 into swiftlang:main May 9, 2024
3 checks passed
@ktoso ktoso deleted the wip-fix-checkIsCurrentExecutorMode branch May 10, 2024 00:08
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