This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// funcao para somar a com b | |
public int Sum(int a, int b) | |
{ | |
// resultado | |
int result; | |
// soma a com b | |
result = a + b; | |
// retorna o resultado |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ParallelRunner<T> | |
{ | |
private List<Task<List<T>>> Tasks { get; } = new List<Task<List<T>>>(); | |
/// <summary> | |
/// Queues the specified work to run | |
/// </summary> | |
public void Run(Task<List<T>> task) | |
{ | |
Tasks.Add(task); |