Conversation
71653c5 to
38c581f
Compare
6995459 to
3d35294
Compare
338bd0a to
86fae4a
Compare
77fe34a to
522ed78
Compare
pblazej
commented
Dec 16, 2025
pblazej
commented
Dec 17, 2025
| /// - onFailure: Called when the sequence terminates with an error. Cancellation errors are ignored. | ||
| /// - Returns: The task cancellable. | ||
| func subscribe<O: AnyObject & Sendable, State: Sendable>( | ||
| _ observer: O, |
Contributor
Author
There was a problem hiding this comment.
Maybe I'll add some more descriptive label like subscribe(weakly: self) etc.
pblazej
commented
Dec 19, 2025
| if let subscriber { self.noLeaks(of: subscriber) } | ||
|
|
||
| self.noLeaks(of: room.publisherDataChannel) | ||
| self.noLeaks(of: room.subscriberDataChannel) |
Contributor
Author
There was a problem hiding this comment.
@hiroshihorie I compared with main again and confirmed that the main leak comes from DC (its main event loop).
c6fbc01 to
abf7230
Compare
Contributor
Author
|
Linking this one for reference: https://medium.com/the-swift-cooperative/using-async-for-await-youre-probably-doing-it-wrong-88b66fbb0e84 |
hiroshihorie
approved these changes
Jan 7, 2026
# Conflicts: # Sources/LiveKit/Core/DataChannelPair.swift
Contributor
Author
|
FYI, I added a brand-new SwiftLint rule to prevent bare |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #866
Fixes remaining concurrency antipatterns (mostly implicit
selfinside a long-runningTask) so thatdeinit(and cancel etc.) is never called.Introduces
AnyTaskCancellablewrapper for more Combine-like semantics (RAII).