fix: Rewrite AppLifeCycleManager onto Combine#95
Merged
abelonogov-ld merged 9 commits intomainfrom Dec 12, 2025
Merged
Conversation
mario-launchdarkly
approved these changes
Dec 12, 2025
Contributor
|
Approved. Tackle the cursor's comments please |
| let notifyStatus = EventNotifyStatus(id: typeId, status: status) | ||
| await broadcaster.send(notifyStatus) | ||
| subject.send(notifyStatus) | ||
| } |
There was a problem hiding this comment.
Bug: EventQueue subject.send called from concurrent Tasks
The notify() method creates a Task that calls subject.send() on a PassthroughSubject. Since EventQueue is an actor, multiple notify() calls create multiple Tasks that can execute concurrently on different threads. The previous implementation used await broadcaster.send() which was actor-isolated and serialized calls. Now PassthroughSubject.send() may be called concurrently from multiple threads, which is not guaranteed to be thread-safe.
abelonogov-ld
pushed a commit
that referenced
this pull request
Dec 12, 2025
🤖 I have created a release *beep* *boop* --- ## [0.13.1](0.13.0...0.13.1) (2025-12-12) ### Bug Fixes * Rewrite AppLifeCycleManager onto Combine ([#95](#95)) ([cb4c21d](cb4c21d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Bump to 0.13.1, updating changelog with bug fix (AppLifeCycleManager rewritten onto Combine) and syncing podspecs and sdkVersion. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit bda38d7. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
abelonogov-ld
added a commit
that referenced
this pull request
Jan 12, 2026
* main: (38 commits) chore(main): release 0.15.2 (#113) fix: make unlock await aware (#111) Fix SwiftUI hits stealing attempt 2 (#112) chore(main): release 0.15.1 (#110) fix: ldMask interfere with hit view testing (#108) chore(main): release 0.15.0 (#106) feat: Deduplicate images before buffering (#107) feat: Gzip compression of graphql request (#105) chore(main): release 0.14.0 (#103) feat: Flush buffers on going to app switcher (#104) fix: UIDevice.current.orientation.isLandscape not main thread access (#102) feat: Limit accumulating canvas buffer (#101) chore: remove disableErrorTracking option (#99) chore: remove unused options in observability plugin (#98) chore(main): release 0.13.1 (#97) fix: Rewrite AppLifeCycleManager onto Combine (#95) chore(main): release 0.13.0 (#96) feat: Identify support (OBS + SR) (#93) chore: Objective-c recordLog (#94) chore(main): release 0.12.1 (#91) ... # Conflicts: # Package.swift # Sources/LaunchDarklyObservability/Plugin/ObservabilityHook.swift # Sources/LaunchDarklyObservability/UIInteractions/TouchIntepreter.swift # Sources/Observability/Client/ObservabilityClientFactory.swift # Sources/OpenTelemetry/Instrumentation/URLSession/URLSessionLogger.swift # TestApp/Sources/AppDelegate.swift # TestApp/Sources/MainMenuView.swift
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.
To make AsyncStream be used correctly you need to create analog of publisher-subscription, which will turn code into similar to Combine. But why recreate Combine it is already exists
Note
Replaces AsyncStream/Broadcaster-based eventing with Combine publishers across lifecycle, session, and transport; updates consumers (logging, snapshot, exporter) and tests; adds cleanup and deadlock-safe dispatch.
events()AsyncStream withpublisher()usingPassthroughSubject; keep UIKit notification observers.publisher(); exposepublisher()forSessionInfo; async-notify on a dedicated queue to avoid deadlock.PassthroughSubject; addpublisher()forEventNotifyStatusand use it for overflow/available notifications.AnyCancellable.EventQueue.publisher()andAppLifecycleManager.publisher()on main queue to control start/stop and availability.SessionManager.publisher()to refresh session info; cancel on deinit.deinitto silently finish all continuations; simplifystreamsetup and termination handling.Written by Cursor Bugbot for commit ca1a811. This will update automatically on new commits. Configure here.