Skip to content

Commit 897e2d3

Browse files
committed
Initialize promise in pending state
1 parent 3be613e commit 897e2d3

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Configs/Hydra.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.0.1</string>
18+
<string>2.0.2</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

HydraAsync.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'HydraAsync'
3-
spec.version = '2.0.1'
3+
spec.version = '2.0.2'
44
spec.summary = 'Promises & Await: Write better async in Swift'
55
spec.homepage = 'https://github.com/malcommac/Hydra'
66
spec.license = { :type => 'MIT', :file => 'LICENSE' }

Sources/Hydra/Promise.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ public class Promise<Value> {
115115
self.bodyCalled = true
116116
}
117117

118+
/// Initialize a promise in pending state.
119+
public init() {
120+
self.state = .pending
121+
self.bodyCalled = true
122+
}
118123

119124
/// Initialize a new Promise in a rejected state with a specified error
120125
///

0 commit comments

Comments
 (0)