大网数据广告活动
网络与域名解析

Asynchronous I/O and Asynchronous RPC

· 52CE 我爱测

Asynchronous I/O is an efficient means for a single thread to manage multiple I/O requests simultaneously.

Asynchronous I/O is an efficient means for a single thread to manage multiple I/O requests simultaneously. Asynchronous RPC on the server accomplishes a similar purpose for RPC requests. In versions of Windows prior to Windows Vista, posting asynchronous I/O requests from server procedures using asynchronous RPC is discouraged. However, in Windows Vista and later versions of Windows, asynchronous I/O requests that are associated with an I/O completion port are supported by asynchronous RPC.

Prior to Windows Vista, an asynchronous remote procedure call may complete before the asynchronous I/O request completes. When the asynchronous call completes, its thread may terminate if the RPC runtime decides it has enough threads available to service the expected workload. The system binds all I/O requests to the thread that initiates them. If the thread terminates, any I/O requests pending on that thread are aborted. Pending I/O requests cannot be moved to another thread.

Therefore, application designers targeting versions of Windows prior to Windows Vista can either use synchronous I/O in server procedures, or they can forward all requests that involve asynchronous I/O to procedures executing on a thread pool that the application manages. The Windows API provides functions for thread-pool management. See Process and Thread Functions.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。