Pin/Unpin Logic (#3084)

This commit is contained in:
Mauro
2024-07-26 20:41:00 +02:00
committed by GitHub
parent 5a4d21ab7a
commit 0da2d4917b
24 changed files with 659 additions and 69 deletions
@@ -14,6 +14,7 @@
// limitations under the License.
//
import Combine
import Foundation
public extension Task where Success == Never, Failure == Never {
@@ -61,3 +62,13 @@ public extension Task where Success == Never, Failure == Never {
}
}
}
extension Task {
func store(in cancellables: inout Set<AnyCancellable>) {
asCancellable().store(in: &cancellables)
}
func asCancellable() -> AnyCancellable {
AnyCancellable(cancel)
}
}