Stop method
The Stop method stops the SimpleIOStress worker thread completely.
Syntax
HRESULT Stop(
[in, optional] VARIANT bAsync
);
Parameters
- bAsync [in, optional]
A VARIANT value that indicates that the SimpleIOStress interface should stop in an asynchronous way. The default value for bAsync is VARIANT_FALSE. If this parameter is VARIANT_FALSE, the Stop method will not return until the worker thread has fully stopped.
Return value
Stop returns a standard HRESULT value. Stop will return a failure code immediately if the SimpleIOStress::State property is currently SimpleIO_Stopped or SimpleIO_Stopping. Otherwise, if the bAsync parameter is VARIANT_TRUE, this method should not fail.
If the bAsync parameter is VARIANT_FALSE, Stop can propagate the failure code that the SimpleIO::Close method produces if it fails. That failure code is discarded if bAsync is VARIANT_TRUE.
Remarks
The Stop method ends the SimpleIOStress worker thread (after it finishes its current action) that was previously started in the SimpleIOStress::Start method. Then, Stop calls the SimpleIO::Close method.
The Stop method will always cause the SimpleIOStress::State method to immediately transition to SimpleIO_Stopping. If the bAsync parameter is VARIANT_TRUE, Stop will not return until it has fully transitioned to SimpleIO_Stopped. Otherwise, Stop will return immediately and the final transition will happen sometime later. Stop will then remain in this state until it is started again.
If you destroy the SimpleIOStress interface, an implicit call to Stop occurs, if needed.
See also
Send comments about this topic to Microsoft
Build date: 1/12/2012