Table of Contents

Class UnresponsiveEventArgs

Namespace
SharpConsoleUI.Core
Assembly
SharpConsoleUI.dll

Raised when the main loop has not heartbeat past the unresponsive threshold. IMPORTANT: raised on the watchdog timer thread (the UI thread is stuck). Handlers must be thread-safe and must NOT touch the UI — log, set a flag, or write raw ANSI only.

public sealed class UnresponsiveEventArgs : EventArgs
Inheritance
UnresponsiveEventArgs
Inherited Members
Extension Methods

Constructors

UnresponsiveEventArgs(TimeSpan, MainLoopPhase, string?, DateTime, bool)

Initializes a new instance of the UnresponsiveEventArgs class.

public UnresponsiveEventArgs(TimeSpan stalledFor, MainLoopPhase phase, string? blockedIn, DateTime timestampUtc, bool showBanner)

Parameters

stalledFor TimeSpan
phase MainLoopPhase
blockedIn string
timestampUtc DateTime
showBanner bool

Properties

BlockedIn

Best-effort label of the user callback that was executing, or null if unknown.

public string? BlockedIn { get; }

Property Value

string

Phase

The main-loop phase executing when the stall was detected.

public MainLoopPhase Phase { get; }

Property Value

MainLoopPhase

ShowBanner

When true (default = WatchdogOptions.ShowUnresponsiveBanner), the built-in ANSI banner is written after the event returns. Set false to suppress it and own the display yourself.

public bool ShowBanner { get; set; }

Property Value

bool

StalledFor

How long the main loop had gone without a heartbeat when the stall was detected.

public TimeSpan StalledFor { get; }

Property Value

TimeSpan

TimestampUtc

UTC timestamp when the stall was detected.

public DateTime TimestampUtc { get; }

Property Value

DateTime