mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Preventing _inputReadyCancellationTokenSource being null.
This commit is contained in:
@@ -223,7 +223,7 @@ internal class NetEvents : IDisposable
|
||||
|
||||
private void ProcessInputQueue ()
|
||||
{
|
||||
while (!_inputReadyCancellationTokenSource.Token.IsCancellationRequested)
|
||||
while (_inputReadyCancellationTokenSource is { IsCancellationRequested: false })
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -242,13 +242,8 @@ internal class NetEvents : IDisposable
|
||||
ConsoleModifiers mod = 0;
|
||||
ConsoleKeyInfo newConsoleKeyInfo = default;
|
||||
|
||||
while (true)
|
||||
while (_inputReadyCancellationTokenSource is { IsCancellationRequested: false })
|
||||
{
|
||||
if (_inputReadyCancellationTokenSource.Token.IsCancellationRequested)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ConsoleKeyInfo consoleKeyInfo;
|
||||
|
||||
try
|
||||
@@ -367,13 +362,8 @@ internal class NetEvents : IDisposable
|
||||
cancellationToken.ThrowIfCancellationRequested ();
|
||||
}
|
||||
|
||||
while (true)
|
||||
while (_inputReadyCancellationTokenSource is { IsCancellationRequested: false })
|
||||
{
|
||||
if (_inputReadyCancellationTokenSource.IsCancellationRequested)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
_winChange.Wait (_inputReadyCancellationTokenSource.Token);
|
||||
|
||||
Reference in New Issue
Block a user