Skip to content

Commit 3c3c61b

Browse files
authored
refactor: modify cancellation source implementation to not store tasks and linked cancellation sources (#15)
* refactor: modify cancellation source implementation to not store tasks and linked cancellation sources * wip: apply swift format * wip: implement new approach fixing crash * wip: fix syntax warnings * wip: initialize cancellable work stream synchronously * wip: fix build failure on XCode project * wip: try fixing build error in Swift 5.6 * wip: fix build fail on Swift 5.6 * wip: refactor stream implementation * wip: remove usage of continuation token * wip: refactor cancellation source implementation * wip: test deconstruction inside closure * wip: fix Swift 5.6 build fail * wip: disable pod lint in watchos * wip: add additional logs * wip: bump version * wip: add multiple task cancellation test * wip: update docs * wip: add docc path to coccoapod library * wip: run tvos and macos lints in separate runners * wip: add id to asynchronous wait log
1 parent 9b1d0d8 commit 3c3c61b

26 files changed

+1252
-1179
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ jobs:
6868
uses: SwiftyLab/ci/.github/workflows/cocoapods.yml@main
6969
strategy:
7070
matrix:
71-
platforms: ['macos tvos', 'ios']
71+
platforms: ['macos', 'ios', 'tvos']
72+
# platforms: ['macos tvos', 'ios', 'watchos']
7273
with:
7374
platforms: ${{ matrix.platforms }}
7475

AsyncObjects.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Pod::Spec.new do |s|
3030
s.watchos.deployment_target = '6.0'
3131
s.osx.deployment_target = '10.15'
3232

33-
s.source_files = "Sources/#{s.name}/**/*.swift", "Sources/#{s.name}/*.docc"
33+
s.source_files = "Sources/#{s.name}/**/*.*"
3434
s.preserve_paths = "{Sources,Tests}/#{s.name}*/**/*", "*.md"
3535
s.pod_target_xcconfig = {
3636
'CLANG_WARN_DOCUMENTATION_COMMENTS' => 'YES',
@@ -63,6 +63,6 @@ Pod::Spec.new do |s|
6363
ts.source_files = "Tests/#{s.name}Tests/**/*.swift"
6464
ts.dependency "#{s.name}/Checked"
6565
ts.dependency "#{s.name}/Logging"
66-
ts.scheme = { :parallelizable => true }
66+
ts.scheme = { :parallelizable => true, :code_coverage => true }
6767
end
6868
end

AsyncObjects.xcodeproj/project.pbxproj

Lines changed: 484 additions & 459 deletions
Large diffs are not rendered by default.

Sources/AsyncObjects/AsyncCountdownEvent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ extension AsyncCountdownEvent {
423423
@usableFromInline
424424
var metadata: Logger.Metadata {
425425
return [
426-
"obj": "\(self)(\(Unmanaged.passUnretained(self).toOpaque()))",
426+
"obj": "\(self)",
427427
"limit": "\(limit)",
428428
"current_count": "\(currentCount)",
429429
"initial_count": "\(initialCount)",

Sources/AsyncObjects/AsyncEvent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ extension AsyncEvent {
251251
@usableFromInline
252252
var metadata: Logger.Metadata {
253253
return [
254-
"obj": "\(self)(\(Unmanaged.passUnretained(self).toOpaque()))",
254+
"obj": "\(self)",
255255
"signalled": "\(signalled)",
256256
]
257257
}

Sources/AsyncObjects/AsyncSemaphore.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ extension AsyncSemaphore {
246246
@usableFromInline
247247
var metadata: Logger.Metadata {
248248
return [
249-
"obj": "\(self)(\(Unmanaged.passUnretained(self).toOpaque()))",
249+
"obj": "\(self)",
250250
"limit": "\(limit)",
251251
"count": "\(count)",
252252
]

0 commit comments

Comments
 (0)