using System.Collections.Concurrent;
namespace Terminal.Gui;
///
/// Interface for reading console input indefinitely -
/// i.e. in an infinite loop. The class is responsible only
/// for reading and storing the input in a thread safe input buffer
/// which is then processed downstream e.g. on main UI thread.
///
///
public interface IConsoleInput : IDisposable
{
///
/// Initializes the input with a buffer into which to put data read
///
///
void Initialize (ConcurrentQueue inputBuffer);
///
/// Runs in an infinite input loop.
///
///
///
/// Raised when token is
/// cancelled. This is the only means of exiting the input.
///
void Run (CancellationToken token);
}