How to implement Command Pattern with async/await
问题 i'm currently upgrading some existing code for use by windows universal and am struggling to convert a command pattern to work with the new async/await functionality. I have a command scheduler class that runs within its own thread and processes commands that have been added to its queue. The method in question looks like this: private List<ICommandItem> _items; private void ProcessCommands() { while(_items.count > 0) { _items[0].Execute(); _items.RemoveAt(0); } } My problem is that some of