Skip to content

Commit 06fce03

Browse files
committed
Add comment on _StateMachine.
1 parent 4369a63 commit 06fce03

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

SwiftTask/_StateMachine.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88

99
import Foundation
1010

11+
///
1112
/// fast, naive event-handler-manager in replace of ReactKit/SwiftState (dynamic but slow),
1213
/// introduced from SwiftTask 2.6.0
14+
///
15+
/// see also: https://github.com/ReactKit/SwiftTask/pull/22
16+
///
1317
internal class _StateMachine<Progress, Value, Error>
1418
{
1519
internal typealias ErrorInfo = Task<Progress, Value, Error>.ErrorInfo
@@ -36,6 +40,7 @@ internal class _StateMachine<Progress, Value, Error>
3640
{
3741
let oldProgress = self.progress
3842

43+
// NOTE: if `weakified = false`, don't store progressValue for less memory footprint
3944
if !self.weakified {
4045
self.progress = progress
4146
}

0 commit comments

Comments
 (0)