-
Sep 1st, 2010, 02:51 AM
#1
Thread Starter
Lively Member
WCF Service Interobject access
Hi
I have a service with worker threads running in the background. I would like to implement WCF in order to communicate the status of these worker threads to a client.
How do I access the instance of the ServiceBehaviour created by the WCF ServiceHost in order to add references to the worker threads so that I can communicate the status?
ROTD
-
Sep 8th, 2010, 01:18 PM
#2
Re: WCF Service Interobject access
If each worker listens to a different port, which is known by the service, the service can talk to the workers.
-
Sep 9th, 2010, 01:37 AM
#3
Thread Starter
Lively Member
Re: WCF Service Interobject access
Thanks for the reply.
I have a single host with a single endpoint. The worker threads executes inside the service itself and is controlled by the service.
I have found a way to let my host have access to the worker threads but I am not loving it. If I make my array where my worker threads are kept in shared in the service then I can access them from my host class.
Surely there has to be another way.
-
Oct 11th, 2010, 01:41 PM
#4
Re: WCF Service Interobject access
The workthreads should report there status back to the mainthread, not the other way around.
-
Oct 12th, 2010, 02:45 AM
#5
Thread Starter
Lively Member
Re: WCF Service Interobject access
Wow! Realy!
O, wait a second:
If I want the worker threads waisting CPU time by reporting the status back to the main monitoring thread that would work.
Also the work threads depend on the control from the monitoring thread and do not control the monitoring thread. If they were to control the monitoring thread then you would have possible thread classes.
Also the instability factor involved with WCF would cause my worker threads to crash or run oncontrolled.
Also your comment has absolutely nothing to do with the main question that I asked.
But thanks for bumping my thread!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|