You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/hierarchical-state-machine-swift/StateAsyncSequence.swift
Copy file name to clipboardExpand all lines: AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/hierarchical-state-machine-swift/StateMachine.swift
+15-48Lines changed: 15 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,7 @@
5
5
// SPDX-License-Identifier: Apache-2.0
6
6
//
7
7
8
-
import Foundation
9
-
10
-
/// Captures a weak reference to the value
11
-
classWeakWrapper<T>where T:AnyObject{
12
-
private(set) weak varvalue:T?
13
-
init(_ value:T){
14
-
self.value = value
15
-
}
16
-
}
8
+
import Combine
17
9
18
10
/// Models, evolves, and processes effects for a system.
19
11
///
@@ -31,15 +23,18 @@ actor StateMachine<
31
23
EnvironmentType:Environment
32
24
>where StateType:State{
33
25
34
-
/// AsyncSequences are invoked a minimum of one time: Each sequence receives the current
35
-
/// state as soon as `listen()` is invoked, and will receive each subsequent state change.
0 commit comments