-
How strong is the guarantee that progress is reported to a client in the order in which the server reports it? Is there a limit on how quickly progress can be reported before this guarantee is no longer supported? I seem to be able to get progress reported out of order if reported very quickly over an async named pipe. I have a very simple interface:
and very simple server method:
and a very simple client method (running in a separate process):
When I run the client and server without any type of progress reporting delay in the server code, I can debug the progress action and see that progress is reported out of order - similar to the following: This is obviously a contrived example where progress is reported very quickly (much more so than is typically reported in real scenarios), but I'm just curious if there's a known limit on how quickly progress can/should be reported (or if I'm doing something incorrectly that is causing the progress to be reported out of order). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Great question. Please find the answer in https://github.com/microsoft/vs-streamjsonrpc/blob/main/doc/progresssupport.md. In short, yes the order is guaranteed, insofar as RPC is involved. In your contrived example, order is being lost within your own client code because the delegate you provided that prints the callbacks runs on the threadpool, which doesn't guarantee order. |
Beta Was this translation helpful? Give feedback.
Great question.
Please find the answer in https://github.com/microsoft/vs-streamjsonrpc/blob/main/doc/progresssupport.md.
In short, yes the order is guaranteed, insofar as RPC is involved. In your contrived example, order is being lost within your own client code because the delegate you provided that prints the callbacks runs on the threadpool, which doesn't guarantee order.