Skip to content
Draft
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
22 changes: 0 additions & 22 deletions Sources/SemanticIndex/TaskScheduler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -678,25 +678,3 @@ fileprivate extension Collection {
return result
}
}

/// Version of the `withTaskPriorityChangedHandler` where the body doesn't throw.
private func withTaskPriorityChangedHandler(
initialPriority: TaskPriority = Task.currentPriority,
pollingInterval: Duration = .seconds(0.1),
@_inheritActorContext operation: @escaping @Sendable () async -> Void,
taskPriorityChanged: @escaping @Sendable () -> Void
) async {
do {
try await withTaskPriorityChangedHandler(
initialPriority: initialPriority,
pollingInterval: pollingInterval,
operation: operation as @Sendable () async throws -> Void,
taskPriorityChanged: taskPriorityChanged
)
} catch is CancellationError {
} catch {
// Since `operation` does not throw, the only error we expect `withTaskPriorityChangedHandler` to throw is a
// `CancellationError`, in which case we can just return.
logger.fault("Unexpected error thrown from withTaskPriorityChangedHandler: \(error.forLogging)")
}
}
164 changes: 0 additions & 164 deletions Sources/SwiftExtensions/AsyncUtils.swift

This file was deleted.

1 change: 0 additions & 1 deletion Sources/SwiftExtensions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
set(sources
Array+Safe.swift
Array+SortAndDedupe.swift
AsyncUtils.swift
Cache.swift
CartesianProduct.swift
Collection+DropLast.swift
Expand Down