This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ConcurrentTaskContainer { | |
private let actor = Actor() | |
private actor Actor { | |
private var tasks = [UUID: Task<Void, Error>]() | |
private var waitForAllTaskContinuations = [CheckedContinuation<Void, Never>]() | |
deinit { | |
for task in tasks.values { | |
task.cancel() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
public extension DefaultStringInterpolation { | |
/// A String interpolation function that respects nested indentation. | |
/// | |
/// Example: | |
/// ```swift | |
/// class Root { | |
/// let children: [Root] = [] |