public delegate void ForkCall(); public class Fork { private List calls = new List(); /// /// Starts an async fork /// /// Returns a new fork instance public static Fork Begin() { return new Fork(); } /// /// /// /// Delegate that should be executed async /// Returns self public Fork Call(ForkCall call) { calls.Add(call); return this; } /// /// Executs all the calls async and waits untill all of them are finished /// public void End() { //convert all calls to running threads //then wait for all threads to finish calls.Select(call => GetThread(call)) .ToList() .ForEach(thread => thread.Join()); } private Thread GetThread(ForkCall call) { Thread thread = new Thread(GetThreadStart(call)); thread.IsBackground = true; thread.Start(); return thread; } private ThreadStart GetThreadStart(ForkCall call) { ThreadStart ts = new ThreadStart(() => call()); return ts; } }