I used a custom SynchronizationContext to use async-await on UI code, which all run in the single main thread