ServiceProxy and CommandQueue implementation

Topics: CAB & Smart Client Software Factory
Aug 7, 2006 at 9:16 PM
originally posted by: IvayloBratoev

I have a few question about the ServiceProxy and CommandQueue implementation.
First, why the CommandWithCallback class fires the callback on the same thread that executes the Queue, but not on a thread from the thread pool. If the callback takes too much time to execute the commands in the queue will wait and may slow down the app.
Second, I have a clearly theoretical question. Is it possible in the Queue.Run method, just after the last Command was executed and the check for next command failed, in this very moment a new Command to be added before the code reaches WaitHandle.WaitAny() line in the ServiceProxy.ThreadHandler() method? If this is possible to happen then the Command will not be executed untill a new Command is added.

Thanks for your time and keep up the great work!