Skip to content

Commit dfa766c

Browse files
Address review comments: doc load() param, sort rationale, repeat:true
Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/5c10b7c5-8efb-45d4-803c-bd7bb9977e39 Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
1 parent d6caa7a commit dfa766c

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

osu.Android/HangWatchdog.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ private static void appendProcTaskSnapshot(StringBuilder sb)
225225
return;
226226
}
227227

228+
// Sort by tid so consecutive dumps for the same hang produce
229+
// diff-able output — makes it easy to spot which thread changed
230+
// state between two snapshots taken 10s apart during a long hang.
228231
collected.Sort(StringComparer.Ordinal);
229232

230233
foreach (string tid in collected)
@@ -316,6 +319,10 @@ public void Arm()
316319

317320
try
318321
{
322+
// repeat: true → reschedule every heartbeat_interval_ms ms.
323+
// The delegate runs on the game thread itself, so its execution
324+
// *is* the liveness signal: if the thread is hung, this never
325+
// fires and LastTickUtcMs stays stale for the monitor to detect.
319326
thread.Scheduler.AddDelayed(tick, heartbeat_interval_ms, true);
320327
}
321328
catch (Exception e)

osu.Android/OsuGameAndroid.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ public override Version AssemblyVersion
140140
private AndroidMouseHandler? mouseHandler;
141141
private AndroidKeyboardHandler? keyboardHandler;
142142

143+
/// <summary>
144+
/// Background-loaded entry point. <paramref name="frameworkConfig"/> is injected
145+
/// to drive <see cref="applyAndroidFrameSyncMigrationOnce"/>, the one-shot Android
146+
/// FrameSync default migration; everything else here is unrelated init wiring.
147+
/// </summary>
143148
[BackgroundDependencyLoader]
144149
private void load(FrameworkConfigManager frameworkConfig)
145150
{

0 commit comments

Comments
 (0)