摘要:支援非同步方法的APIs

  • 849
  • 0

支援非同步方法的APIs

應用領域 支援非同步方法的APIs
網路 HttpClient , SyndicationClient
檔案 StorageFile, StreamWriter, StreamReader, XmlReader
圖片 MediaCapture, BitmapEncoder, BitmapDecoder
WCF Synchronous and Asynchronous Operations

上表是.Net Framework 4.5與Windows Runtime所支援的非同步程式設計。

可以用以縮短應用程式回應使用者的時間,不至於因為下載、讀取與寫入大量的資料,導致整個使用者畫面被鎖定,以避免使用者不耐煩,或者避免使用者誤會系統當機。

資料來源:

[1]Asynchronous Programming with Async and Await (C# and Visual Basic)
http://msdn.microsoft.com/en-us/library/hh191443.aspx

[2]Async Improves Responsiveness
http://msdn.microsoft.com/en-us/library/hh191443.aspx#BKMK_WhentoUseAsynchrony