File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Sources/NetworkingClient/Tasks Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,6 @@ internal actor NetworkTaskValues<T: Sendable> {
4141 /// The current ``URLSessionTask`` instance, if any.
4242 internal var sessionTask : URLSessionTask ?
4343
44- /// The current execution state of a task.
45- internal private( set) var state = TaskState . created
46-
4744 /// The stream continuation for emitting progress values.
4845 private var stateStreamContinuation : AsyncStream < TaskState > . Continuation ? {
4946 didSet {
@@ -60,6 +57,13 @@ internal actor NetworkTaskValues<T: Sendable> {
6057 }
6158 } ( )
6259
60+ /// The current execution state of a task.
61+ internal private( set) var state = TaskState . created {
62+ didSet {
63+ stateStreamContinuation? . yield ( state)
64+ }
65+ }
66+
6367// MARK: - Initializer
6468 /// Creates a new task state container.
6569 ///
@@ -128,7 +132,6 @@ internal actor NetworkTaskValues<T: Sendable> {
128132 return false
129133 }
130134 state = newState
131- stateStreamContinuation? . yield ( state)
132135 return true
133136 }
134137
You can’t perform that action at this time.
0 commit comments