Skip to content

Commit 79ba4b8

Browse files
committed
fix: handle disposed ManualResetEventSlim on shutdown, add .superpowers to gitignore
1 parent 2ad3c7b commit 79ba4b8

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
CLAUDE.md
1515
.claude/
1616
docs/superpowers
17+
.superpowers/
1718

1819
# User-specific files (MonoDevelop/Xamarin Studio)
1920
*.userprefs

SharpConsoleUI/ConsoleWindowSystem.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,15 @@ public int Run()
707707
UpdateCursor();
708708
if (_uiActionsPending && _idleTime > Configuration.SystemDefaults.MinSleepDurationMs)
709709
_idleTime = Configuration.SystemDefaults.MinSleepDurationMs;
710-
_wakeSignal.Wait(_idleTime);
711-
_wakeSignal.Reset();
710+
try
711+
{
712+
_wakeSignal.Wait(_idleTime);
713+
_wakeSignal.Reset();
714+
}
715+
catch (ObjectDisposedException)
716+
{
717+
break; // Shutdown disposed the signal — exit loop
718+
}
712719
}
713720
}
714721
catch (Exception ex)

0 commit comments

Comments
 (0)