fix(threads): mark PendingMessage thread as background, document RetentionSweep rationale

This commit is contained in:
2026-05-07 00:54:43 +02:00
parent 079e280226
commit 8c624a0032
2 changed files with 14 additions and 1 deletions
+5
View File
@@ -691,6 +691,11 @@ public sealed class Plugin : IDalamudPlugin
policy[(int)(ushort)type] = days;
var defaultDays = Config.RetentionDefaultDays;
// IsBackground = true for the same reason as PendingMessageThread:
// a stuck sweep must never block plugin unload. RunRetentionSweepIfDue
// guards the run-frequency, and the sweep itself uses the framework's
// cooperative cancellation pattern. The background flag is the safety
// net if the sweep ever takes longer than expected.
new Thread(() =>
{
// Bail out cheaply if a manual sweep is already in flight; the