Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make NIOPosix strict-concurrency clean #3090

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ let package = Package(
swiftAtomics,
],
exclude: includePrivacyManifest ? [] : ["PrivacyInfo.xcprivacy"],
resources: includePrivacyManifest ? [.copy("PrivacyInfo.xcprivacy")] : []
resources: includePrivacyManifest ? [.copy("PrivacyInfo.xcprivacy")] : [],
swiftSettings: strictConcurrencySettings
),
.target(
name: "NIO",
Expand Down
2 changes: 1 addition & 1 deletion Sources/NIOPosix/GetaddrinfoResolver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ internal final class GetaddrinfoResolver: Resolver, Sendable {

// Ensure that both futures are succeeded in the same tick
// to avoid racing and potentially leaking a promise
self.loop.execute {
self.loop.execute { [v4Results, v6Results] in
self.v6Future.succeed(v6Results)
self.v4Future.succeed(v4Results)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/NIOPosix/SelectableEventLoop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ internal final class SelectableEventLoop: EventLoop, @unchecked Sendable {
id: self.scheduledTaskCounter.loadThenWrappingIncrement(ordering: .relaxed),
{
do {
promise.succeed(try task())
promise.assumeIsolatedUnsafeUnchecked().succeed(try task())
} catch let err {
promise.fail(err)
}
Expand Down
Loading