Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach(var item in collection)
- {
- DoWork().Wait;
- }
- public async Task DoWork()
- {
- Try
- {
- Parallel.Invoke(
- () => Foo(),
- () => Foo2(),
- () => Foo3());
- }
- catch(Exception e)
- {
- //No exception caught
- }
- }
- public void Foo()
- {
- Console.WriteLine("foo 1");
- }
Add Comment
Please, Sign In to add comment