Skip to content

Conversation

@plemarquand
Copy link
Contributor

Squashes the warnings in AsyncProcess by adjusting required callbacks to be @Sendable, marking lock protected state as nonisolated(unsafe) and using a ThreadSafeBox to capture the process result. Fixes up warnings in AsyncProcessTests as well.

Squashes the warnings in AsyncProcess by adjusting required callbacks to
be `@Sendable`, marking lock protected state as `nonisolated(unsafe)`
and using a `ThreadSafeBox` to capture the process result.
@plemarquand
Copy link
Contributor Author

@swift-ci test windows

@plemarquand
Copy link
Contributor Author

@swift-ci test Linux

@plemarquand
Copy link
Contributor Author

@swift-ci test windows

@plemarquand
Copy link
Contributor Author

@swift-ci test macos

package typealias LoggingHandler = @Sendable (String) -> Void

private static var _loggingHandler: LoggingHandler?
nonisolated(unsafe) private static var _loggingHandler: LoggingHandler?
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of nonisolated(unsafe) can you use ThreadSafeBox?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. I've also updated validatedExecutablesMap to use ThreadSafeKeyValueStore.

@plemarquand
Copy link
Contributor Author

@swift-ci test

@plemarquand
Copy link
Contributor Author

@swift-ci test windows

3 similar comments
@plemarquand
Copy link
Contributor Author

@swift-ci test windows

@plemarquand
Copy link
Contributor Author

@swift-ci test windows

@plemarquand
Copy link
Contributor Author

@swift-ci test windows

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