FileIO.ReadTextAsync occasionally hangs

后端 未结 2 2112
梦谈多话
梦谈多话 2021-01-23 04:58

I\'m just experimenting with WinRT and one demo app i\'m creating is a basic \"notepad\" style app which loads/saves to local storage. Whilst I\'m familiar with the proper

2条回答
  •  既然无缘
    2021-01-23 05:33

    Try to use ConfigureAwait(false) with the await operation, may be ReadTextAsync is not thread safe, so it will hang the UI thread when the await finished and back to the UI thread.

提交回复
热议问题