Skip to content

Commit

Permalink
Fix multithreading issue caused by wrong copy-paste
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaofei86 committed Feb 18, 2022
1 parent c4d7c8d commit a1ce164
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CarbonCore.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |spec|

spec.name = 'CarbonCore'
spec.version = '1.3.0'
spec.version = '1.3.1'
spec.license = { :type => 'MIT', :file => 'LICENSE' }
spec.summary = 'Swift dependency injection framework for iOS'
spec.homepage = 'https://github.com/baidu/CarbonGraph'
Expand Down
4 changes: 2 additions & 2 deletions CarbonCore/CarbonCore/CarbonCore.docc/Compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ The Requirements and Compatibility

| CarbonCore Stable Version | Required iOS Version | Required Swift Version |
| --- | --- | --- |
| 1.2.2 - 1.3.0 | 9.0 | 5.2 |
| 1.2.2, 1.3.1 | 9.0 | 5.2 |

### CarbonObjC Version Compatibility

| CarbonObjC Version | CarbonCore Compatible Version |
| --- | --- |
| 1.2.2 | 1.2.2 |
| 1.3.0 | 1.3.0 |
| 1.3.1 | 1.3.1 |

### Build for distribution

Expand Down
4 changes: 2 additions & 2 deletions CarbonCore/CarbonCore/ObjectResolver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class ObjectResolver: NSObject {
}

// Object created by other thread
if let safeObject = (def.lock.read { def.storage.object }),
if let safeObject = def.storage.object,
let otherObject = safeObject as? T {
return otherObject
}
Expand Down Expand Up @@ -126,7 +126,7 @@ public class ObjectResolver: NSObject {
}

// Object created by factory or constructor
if let safeObject = (def.lock.read { def.storage.object }),
if let safeObject = def.storage.object,
let otherObject = safeObject as? T {
return otherObject
}
Expand Down
2 changes: 1 addition & 1 deletion CarbonObjC.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |spec|

spec.name = 'CarbonObjC'
spec.version = '1.3.0'
spec.version = '1.3.1'
spec.license = { :type => 'MIT', :file => 'LICENSE' }
spec.homepage = 'https://github.com/baidu/CarbonGraph'
spec.authors = { 'Baidu' => '[email protected]' }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ The CarbonGraph project contains 2 frameworks:

| CarbonCore Stable Version | Required iOS Version | Required Swift Version |
| --- | --- | --- |
| 1.2.2 - 1.3.0 | 9.0 | 5.2 |
| 1.2.2, 1.3.1 | 9.0 | 5.2 |

* CarbonObjC Version Compatibility

| CarbonObjC Version | CarbonCore Compatible Version |
| --- | --- |
| 1.2.2 | 1.2.2 |
| 1.3.0 | 1.3.0 |
| 1.3.1 | 1.3.1 |

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

Expand Down

0 comments on commit a1ce164

Please sign in to comment.