WCF Service worker thread communicate with ServiceHost thread

Posted by Brent on Stack Overflow See other posts from Stack Overflow or by Brent
Published on 2010-03-17T17:48:57Z Indexed on 2010/03/17 17:51 UTC
Read the original article Hit count: 555

Filed under:
|
|
|

I have a windows NT Service that opens a ServiceHost object. The service host context is per-session so for each client a new worker thread is created. What I am trying to do is have each worker thread make calls to the thread that started the service host. The NT Service needs to open a VPN connection and poll information from a device on the remote network. The information is stored in a SQL database for the worker threads to read. I only want to poll the device if there is a client connected, which will reduce network trafic. I would like the worker threads to tell the service host thread that they are requesting information and start the polling and updating the database. Everything is working if the device is alway being polled and the database being updated.

© Stack Overflow or respective owner

Related posts about wcf

Related posts about thread