Add TimeSpan timeout parameter to Util.ReadLine<TResult> method. Add CancellationToken parameter to Util.ReadLineAsync<TResult> method.
I've implemented a Task timeout extension to abandon long running tasks. When that task is setup to check for a cancellation token's IsCancellationRequested property the task can finish appropriately.
Currently when calling Util.ReadLine or when awaiting Util.ReadLineAsync the task gets abandoned but not cancelled. The user prompt box remains open and I haven't found a way to cancel\remove\reset it.
A cancellation timeout (or cancellation token on the async method) would be useful for automatically selecting the default value after a specified timeout has elapsed. Execution could then be terminated or continued as the script has been directed.