Queueing method calls - any idea how?
Posted
by TomTom
on Stack Overflow
See other posts from Stack Overflow
or by TomTom
Published on 2010-05-05T16:05:49Z
Indexed on
2010/05/05
16:08 UTC
Read the original article
Hit count: 305
c#
|transparentproxy
I write a heavily asynchronseous application.
I am looking for a way to queue method calls, similar to what BeginInvoke / EndInvoke does.... but on my OWN queue. The reaqson is that I am having my own optimized message queueing system using a threadpool but at the same time making sure every component is single threaded in the requests (i.e. one thread only handles messages for a component).
I Have a lot of messages going back and forth. For limited use, I would really love to be able to just queue a message call with parameters, instead of having to define my own parameter, method wrapping / unwrapping just for the sake of doing a lot of admnistrative calls. I also do not always want to bypass the queue, and I definitely do not want the sending service to wait for the other service to respond.
Anyone knows of a way to intercept a method call? Some way to utilize TransparentProxy / Virtual Proxy for this? ;) ServicedComponent? I would like this to be as little overhead as possible ;)
© Stack Overflow or respective owner