public Task<VList<LNode>>[] ProcessAsync(IReadOnlyList<InputOutput> sourceFiles, Action<InputOutput> onProcessed = null)
{
int parentThreadId = Thread.CurrentThread.ManagedThreadId;
Task<VList<LNode>>[] tasks = new Task<VList<LNode>>[sourceFiles.Count];
for (int i = 0; i < tasks.Length; i++)
{
var io = sourceFiles[i];
tasks[i] = System.Threading.Tasks.Task.Factory.StartNew<VList<LNode>>(() => {
using (ThreadEx.PropagateVariables(parentThreadId))
return new MacroProcessorTask(this).ProcessFileWithThreadAbort(io, onProcessed, AbortTimeout);
});
}
return tasks;
}