大网数据广告活动
Web服务器与PHP

Demand Start on Version 2.0 Request Queues

· 52CE 我爱测

Demand Start on Version 2.0 Request Queues

The demand start feature of the HTTP Server version 2.0 API request queues allows controller application to delay worker process instantiation until the first request arrives on the request queue. Thus, the applications can avoid consuming resources until they are required. For more information about the controller application, see the Named Request Queue topic.

Asynchronous Demand Start

The controller application calls HttpWaitForDemandStart with the handle to the request queue to initiate a demand start notification. For asynchronous completion, the application supplies the overlapped structure in the pOverlapped parameter. When HttpWaitForDemandStart is called asynchronously, the controller application is notified when the first request arrives on the request queue. After the demand start notification completes, the controller application can register for another demand start notification on the request queue.

The HTTP Server API does not allow more than one simultaneous demand start notification for a request queue. However, when the outstanding demand start notification completes, the application calls HttpWaitForDemandStart again to start multiple worker processes on the request queue. HTTP does not enforce limitations on the number of demand start notifications or the number of worker processes operating on the request queue. The controller applications can, however, enforce the number of worker processes allowed on a request queue.

The HTTP Server API supports canceling asynchronous HttpWaitForDemandStart calls. Applications can use CancelIoEx with the overlapped structure supplied in pOverlapped, to cancel an outstanding HttpWaitForDemandStart call.

Synchronous Demand Start

Synchronous demand start is not recommended because the application blocks until a request arrives on the request queue.

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)

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

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