Skip to content

TSCBasic: make FS-related value types Sendable #382

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 5 commits into from
Jan 19, 2023

Conversation

MaxDesiatov
Copy link
Contributor

@MaxDesiatov MaxDesiatov commented Jan 18, 2023

When using FileSystem-related code in async context we need these types to be Sendable.

@MaxDesiatov MaxDesiatov self-assigned this Jan 18, 2023
@MaxDesiatov MaxDesiatov changed the title TSCBasic: make ByteString Sendable TSCBasic: make more value types Sendable Jan 18, 2023
@@ -122,17 +122,17 @@ public enum FileMode {
case userWritable
case executable

internal var setMode: (Int16) -> Int16 {
public func setMode(_ originalMode: Int16) -> Int16 {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to pull in some of the FS-related code into SwiftPM, but that depends on this function being public. That was also a good opportunity to convert it from this unconventional var-returning-a-closure notation.

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov MaxDesiatov changed the title TSCBasic: make more value types Sendable TSCBasic: FS-related value types Sendable Jan 18, 2023
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test macOS

@MaxDesiatov MaxDesiatov changed the title TSCBasic: FS-related value types Sendable TSCBasic: make FS-related value types Sendable Jan 18, 2023
@MaxDesiatov MaxDesiatov merged commit 000c1da into main Jan 19, 2023
@MaxDesiatov MaxDesiatov deleted the maxd/tscbasic-sendable branch January 19, 2023 07:12
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