<div dir="ltr"><div>Hello</div><div><br></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">I recently wondered if there was any room left to implement some kind of poor man's "back pressure" system thanks to the latest version of StructuredTaskScope ?<br><br>Behind this "poor man's back pressure" term, I have in mind something like :<br></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><ul><li>an endpoint to be called for X distinct IDs</li><li>a loop that "<b><font face="monospace">.fork"</font></b> the M first calls, then wait until one complete before forking the M+1 call ... </li><li>... and so on until all calls got forked</li><li>then wait for the remaining calls completions by calling the join method</li></ul></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>The point being of course to have at most M calls in flight at a time</div><div><br></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>I doubt it's still possible to do it seeing the latest evolution of the API in Java 25, especially since the "event callbacks" from the Java 21 implementation don't seem to be available anymore, but maybe I'm wrong ?</div><div><br></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>Looking forward to your advice about it !</div><div><br></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>Best regards.</div></blockquote></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Benoit Lefèvre</div></div></div>