Microsoft Internet Security and Acceleration Server 2000 |
Notifies the Firewall service that a thread is busy with a lengthy blocking operation.
HRESULT StartHeavyBlockingOperation()
The StartHeavyBlockingOperation and EndHeavyBlockingOperation methods manage the creation of additional completion-port worker threads when all existing threads are blocked. The completion port model works best when all I/O operations are overlapped. When some calls are blocking, all worker threads may be blocked, and the service will be idle. When this method is used the Firewall service keeps track of the number of threads that are busy with blocking operations and creates new threads when necessary.
Call the StartHeavyBlockingOperation method before making a blocking operation such as a call to the gethostbyname function or reading (non-overlapped) from a file or a pipe. Call EndHeavyBlockingOperation after the blocking call returns.
Do not call StartHeavyBlockingOperation before waiting for a critical section or a resource on which other threads are likely to be blocked. If the newly created thread is blocked on the same critical section, there will be greater congestion on the critical section and more context switches, resulting in an overall reduction in performance.