Thread Safety

All functions in this API are safe to call concurrently from different threads. However, each object passed as a parameter to the functions have specific threading behavior, as described below.

The following handles are single threaded and do not support concurrent operations for a particular instance:

The following handles are free threaded and do support concurrent operations for a particular instance:

For all these handles, threading is defined in terms of operations (not function calls). An operation is defined differently for functions invoked synchronously versus functions invoked asynchronously:

  • For functions invoked synchronously, the operation is pending during the execution of the function.
  • For functions invoked asynchronously, if the function returns a return code other than WS_S_ASYNC the operation is pending during the execution of the function. If the function returns WS_S_ASYNC , however, the operation is pending until the WS_ASYNC_CALLBACK is invoked. For more information about invoking functions asynchronously, see the Asynchronous Model topic. For error codes, see Windows Web Services Return Values.

Failure to follow the threading contract for an object will result in undefined behavior.