2using System.Threading.Tasks;
12 private readonly TaskCompletionSource<bool> result;
13 private readonly
bool terminate;
20 public ConsoleFlush(
bool Terminate, TaskCompletionSource<bool> Result)
22 this.terminate = Terminate;
30 public override async Task
Execute(CancellationToken Cancel)
32 await
System.Console.Out.FlushAsync();
37 this.result.TrySetResult(
true);
Used to signal end of queue has been reached.
ConsoleFlush(bool Terminate, TaskCompletionSource< bool > Result)
Used to signal end of queue has been reached.
override async Task Execute(CancellationToken Cancel)
Executes the console operation.
Processes console tasks, such as input and output, in a serialized asynchronous manner.
Represents an asynchronous operation to be performed.