Understanding Threads

Understanding Threads

This topic provides information about threads in the DPWS stack.

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.

Show:
© 2016 Microsoft