Table of Contents

Method Initialize

Namespace
Terminal.Gui.Drivers
Assembly
Terminal.Gui.dll

Initialize(ConcurrentQueue<TInputRecord>)

Initializes the input reader with the thread-safe queue where read input will be stored.

public void Initialize(ConcurrentQueue<TInputRecord> inputQueue)

Parameters

inputQueue ConcurrentQueue<TInputRecord>

The shared ConcurrentQueue<T> that both Run(CancellationToken) (producer) and IInputProcessor (consumer) use for passing input records between threads.

Remarks

This queue is created by Terminal.Gui.App.MainLoopCoordinator<TInputRecord> and shared between the input thread and main UI thread.

Must be called before Run(CancellationToken). Calling Run(CancellationToken) without initialization will throw an exception.