Microsoft Internet Security and Acceleration Server 2004 SDK

IFWXFirewall::StartHeavyBlockingOperation

The StartHeavyBlockingOperation method notifies the Microsoft Firewall service that a thread is busy with a lengthy blocking operation.

HRESULT StartHeavyBlockingOperation();

Parameters

This method has no parameters.

Return Values

S_OK
The method succeeded.
FWX_E_ALREADY_IN_BLOCKING_OP
The blocking operation is already started.

Remarks

The IFWXFirewall::StartHeavyBlockingOperation and IFWXFirewall::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 IFWXFirewall::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 the IFWXFirewall::EndHeavyBlockingOperation method after the blocking call returns.

Do not call the IFWXFirewall::StartHeavyBlockingOperation method 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.

Requirements

Server: Requires Windows Server 2003 or Windows 2000.
Version: Requires Internet Security and Acceleration Server 2004.
Header: Declared in Wspfwext.idl.

See Also

IFWXFirewall, IFWXFirewall::EndHeavyBlockingOperation