You have a problem with async void . When you pass async lambda to Action , the compiler creates an async void method for you.
As a best practice, you should avoid async void .
One way to do this is to have your list of actions List<Func<Task>> instead of List<Action> . This allows you to queue async Task methods instead of async void methods.
This means that your execution code will have to wait for each Task as it completes. In addition, your synchronous methods will need to return Task.FromResult(0) or something similar to match the Func<Task> signature.
If you want to use a larger solution, I recommend that you carefully consider the TPL data stream instead of creating your own queue.
source share