Skip to content

[5.7] Make the Regex type Sendable #467

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

Conversation

natecook1000
Copy link
Member

This change makes Regex, RegexComponent, and its component types Sendable.

Regex stores a Program instance, which lazily lowers the DSLTree into a compiled program. Without synchronization, this lazy compilation is unsafe under concurrency. This change uses atomic initialization for the compiled program.

This is a cherry-pick of #457.

This change makes `Regex`, `RegexComponent`, and its component types `Sendable`.

Regex stores a `Program` instance, which lazily lowers the DSLTree into a 
compiled program. Without synchronization, this lazy compilation is unsafe 
under concurrency. This change uses atomic initialization for the compiled 
program.
@natecook1000 natecook1000 added the r5.7 5.7 Release Cherry Picks label Jun 1, 2022
@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000 natecook1000 merged commit 5155a83 into swiftlang:swift/release/5.7 Jun 2, 2022
@natecook1000 natecook1000 deleted the 5.7/sendable branch June 2, 2022 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r5.7 5.7 Release Cherry Picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants