Hi,
Still working away on my remoting based client/server setup - new problem I
have is as follows:
My windows service (the "server" as far as remoting is concerned) has a
method that is called by a timer at certain intervals. This raises events
that the "client" (a Winforms app) receives and acts on. This works
absolutely fine. However, I want users to be able to manually kick off said
method whenever they want in addition to the timed ones, and this is where
the problem lies. I put a button on my forms app that calls the same method
in the server, but at the point within the method that the event is fired
back to the client, the client freezes. I assume this is because the method
it called on the server hasn't yet completed, so the two bits of
communication are somehow getting crossed and cocking things up... any
pointers?
JamesB - 12 Mar 2008 22:53 GMT
> Hi,
> Still working away on my remoting based client/server setup - new problem
[quoted text clipped - 11 lines]
> communication are somehow getting crossed and cocking things up... any
> pointers?
OK - half a solution - I can get around the client crashing by calling my
method:
Thread remotemethod = new Thread(new ThreadStart(remobj.method));
remotemethod.Start();
Now my events come back without killing the client - but, monitoring this in
task manager, my number of threads (and memory usage) go up each time. How
can I get rid of the thread afterwards?