同步和異步I/O操作

     Mos系統下有關於異步 I/O操作的概念。以前不是非常瞭解,現在搜索到一 個解釋,如下:

   

    Synchronization :

    When a function is executed synchronously, it does not return until the operation has been completed.

This means that the execution of the calling thread can be blocked for an indefinite period while it waits for a time-consuming operation to finish.


Asynchronous (or overlapped):

    Functions called for overlapped operation can return immediately, even though the operation has not been completed. This enables a time-consuming I/O operation to be executed in the background while the calling thread is free to perform other tasks.

     When performing multiple simultaneous overlapped operations, the calling thread must specify an OVERLAPPED structure with a different manual-reset event object for each operation.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章