Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a1ce164

Browse files
committed
Fix multithreading issue caused by wrong copy-paste
1 parent c4d7c8d commit a1ce164

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

CarbonCore.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |spec|
22

33
spec.name = 'CarbonCore'
4-
spec.version = '1.3.0'
4+
spec.version = '1.3.1'
55
spec.license = { :type => 'MIT', :file => 'LICENSE' }
66
spec.summary = 'Swift dependency injection framework for iOS'
77
spec.homepage = 'https://github.com/baidu/CarbonGraph'

CarbonCore/CarbonCore/CarbonCore.docc/Compatibility.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ The Requirements and Compatibility
88

99
| CarbonCore Stable Version | Required iOS Version | Required Swift Version |
1010
| --- | --- | --- |
11-
| 1.2.2 - 1.3.0 | 9.0 | 5.2 |
11+
| 1.2.2, 1.3.1 | 9.0 | 5.2 |
1212

1313
### CarbonObjC Version Compatibility
1414

1515
| CarbonObjC Version | CarbonCore Compatible Version |
1616
| --- | --- |
1717
| 1.2.2 | 1.2.2 |
18-
| 1.3.0 | 1.3.0 |
18+
| 1.3.1 | 1.3.1 |
1919

2020
### Build for distribution
2121

CarbonCore/CarbonCore/ObjectResolver.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class ObjectResolver: NSObject {
4545
}
4646

4747
// Object created by other thread
48-
if let safeObject = (def.lock.read { def.storage.object }),
48+
if let safeObject = def.storage.object,
4949
let otherObject = safeObject as? T {
5050
return otherObject
5151
}
@@ -126,7 +126,7 @@ public class ObjectResolver: NSObject {
126126
}
127127

128128
// Object created by factory or constructor
129-
if let safeObject = (def.lock.read { def.storage.object }),
129+
if let safeObject = def.storage.object,
130130
let otherObject = safeObject as? T {
131131
return otherObject
132132
}

CarbonObjC.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |spec|
22

33
spec.name = 'CarbonObjC'
4-
spec.version = '1.3.0'
4+
spec.version = '1.3.1'
55
spec.license = { :type => 'MIT', :file => 'LICENSE' }
66
spec.homepage = 'https://github.com/baidu/CarbonGraph'
77
spec.authors = { 'Baidu' => '[email protected]' }

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ The CarbonGraph project contains 2 frameworks:
3434

3535
| CarbonCore Stable Version | Required iOS Version | Required Swift Version |
3636
| --- | --- | --- |
37-
| 1.2.2 - 1.3.0 | 9.0 | 5.2 |
37+
| 1.2.2, 1.3.1 | 9.0 | 5.2 |
3838

3939
* CarbonObjC Version Compatibility
4040

4141
| CarbonObjC Version | CarbonCore Compatible Version |
4242
| --- | --- |
4343
| 1.2.2 | 1.2.2 |
44-
| 1.3.0 | 1.3.0 |
44+
| 1.3.1 | 1.3.1 |
4545

4646
For more information see [Compatibility](./CarbonCore/CarbonCore/CarbonCore.docc/Compatibility.md)
4747

0 commit comments

Comments
 (0)