Share via


Understanding Threads

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Three main threads of the DPWS device stack process the eventing queue, along with UDP and HTTP requests.

The DPWS device stack operates on three main threads, which are started when Dpws.Device.Device.Start is called. One is used for processing UDP requests for device discovery, a thread that is not exposed in the API. A second is used for the eventing queue and a third for processing HTTP requests. The HTTP thread spawns at most one processing thread for each type of service hosted on the device. These threads last only as long as required to process each HTTP request.

Operations within a particular service are processed synchronously, so only one operation per service can be processed at a time. This is usually acceptable for the applications for which DPWS is designed. If you need to be able to process multiple operations in a particular service simultaneously, you can create multiple services of the same type as long as they have different endpoints.