Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ private void ThreadProc()
const int AnsiUpdateCadenceInMs = 500;
while (!_cts.Token.WaitHandle.WaitOne(AnsiUpdateCadenceInMs))
{
// Note: OnProgressStartUpdate is invoked outside the lock to avoid a deadlock where
// a test subscriber blocks the event handler (e.g. with WaitOne) while the lock is held,
// preventing other callers (e.g. WriteToTerminal) from acquiring the lock.
OnProgressStartUpdate?.Invoke(this, EventArgs.Empty);
lock (_lock)
{
OnProgressStartUpdate?.Invoke(this, EventArgs.Empty);
_terminal.StartUpdate();
try
{
Expand Down
Loading