Skip to content

Commit 623018f

Browse files
runningcodeclaude
andcommitted
docs(android): Say which lock guards sessionEnd (JAVA-573)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 404d211 commit 623018f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎sentry-android-core/src/main/java/io/sentry/android/core/LifecycleWatcher.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ final class LifecycleWatcher implements AppState.AppStateListener {
2424
/**
2525
* When the session the app left behind stops being resumable, or null while in the foreground.
2626
*
27-
* <p>One deadline decides both halves of the background window: when the scheduled task ends the
28-
* session, and whether a foreground arriving first is soon enough to keep it. Measuring that one
29-
* window in two places used to mean two clock readings, which a clock step could make disagree.
27+
* <p>Only read or written while holding {@link #endSessionLock}, which is also what lets
28+
* cancelling the pending task and taking this deadline happen as one step.
3029
*/
3130
private @Nullable Deadline sessionEnd;
3231

0 commit comments

Comments
 (0)