同步和异步I/O操作

来源:互联网 发布:itunes软件下载安装 编辑:程序博客网 时间:2024/05/21 15:46

     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.

原创粉丝点击