Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>So that when it does that, the calling task blocks. Then the queue waits for X calls to accumulate</p> </blockquote> <p>If the queue receives x calls (x &lt; X) then the calling task will block until another task pushes the total >= X. If you only have one task that wants to make N * x calls, it will get stuck.</p> <p>If your application usually has a lot of tasks running, then you might only see this problem intermittently - where you have unusually low load, or a clean shutdown.</p> <p>You could solve this by adding a time out, so that the queue will send the batched requests anyway if no requests have been added within a time limit, and/or the first request has been waiting longer than a time limit.</p> <blockquote> <p>I could of course rewrite this code to make the list of requests on the Parent class and then call the service.</p> </blockquote> <p>Perhaps you are on the right track with this approach. Could you find a way of replacing the generated method implementation with a hand-coded implementation, by delegation, inheritance, lambda method, or enhancing your generator?</p> <hr> <blockquote> <p>... with my real problem all this code is generated.</p> </blockquote> <p>One point that I'm not quite clear on is which parts of the code are generated (hard to modify) and which parts of the code can be modified to solve this problem?</p> <ol> <li>Child.RemoteCall()</li> <li>Parent.SumChildren()</li> <li>Neither of the above.</li> </ol> <p>If it's neither of the above then you have to be able to modify something in order to solve the problem. Are the Parent and Child instances built by an AbstractFactory? If so, then it might be possible to insert a proxy to the Child instances that can be used to modify the non-functional aspects of their behavior(s).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload