File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
arcgis_map_sdk_ios/ios/arcgis_map_sdk_ios/Sources/arcgis_map_sdk_ios Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change 11//
2- // ManualLocationDataSource.swift
3- // arcgis_map_sdk_ios
4- //
52// Created by Julian Bissekkou on 27.11.23.
63//
74
85import Foundation
96import ArcGIS
107
118final class CustomLocationProvider : LocationProvider {
12- private var locationContinuation : AsyncThrowingStream < Location , Error > . Continuation ?
13- private var headingContinuation : AsyncThrowingStream < Double , Error > . Continuation ?
9+ private var locationContinuation : AsyncStream < Location > . Continuation ?
10+ private var headingContinuation : AsyncStream < Double > . Continuation ?
1411
1512
1613 // Exposed stream
17- var locations : AsyncThrowingStream < Location , Error > {
18- AsyncThrowingStream { continuation in
14+ var locations : AsyncStream < Location > {
15+ AsyncStream { @ Sendable continuation in
1916 self . locationContinuation = continuation
17+ continuation. onTermination = { _ in
18+ self . locationContinuation = nil
19+ }
2020 }
2121 }
2222
23- var headings : AsyncThrowingStream < Double , Error > {
24- AsyncThrowingStream { continuation in
23+ var headings : AsyncStream < Double > {
24+ AsyncStream { continuation in
2525 self . headingContinuation = continuation
26+ continuation. onTermination = { @Sendable _ in
27+ self . headingContinuation = nil
28+ }
2629 }
2730 }
2831
You can’t perform that action at this time.
0 commit comments