<div dir="ltr"><div dir="ltr">Robert Engels <<a href="mailto:rengels@ix.netcom.com">rengels@ix.netcom.com</a>> ezt írta (időpont: 2023. aug. 7., H, 0:05):<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="ltr"></div><div dir="ltr">That is nonsensical.  It would mean you would have to pass the supplier to multi threads of execution or you would only have a single execution possible. </div><div dir="ltr"><br></div></div></blockquote><div>I'm not sure where your confusion is coming from. This limits the number of concurrent execution of all the actions passed to it. Of course, you will have to use multiple threads. A single thread does not need to have such a constraint.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="ltr"></div><div dir="ltr">So the interface does nothing in the case. Use a semaphore if you need to limit concurrency - call the supplier directly if you don’t. </div><div dir="ltr"><br></div><div dir="ltr">You added a layer that doesn’t do anything but is obscure the code/intent. </div><div dir="ltr"></div><blockquote type="cite"><div dir="ltr"><br></div></blockquote></div></blockquote><div>I think you misunderstand the point. The implementation might not know what kind of constraints you want to put on it. In fact, it is possible that you want to put multiple things under the same constraint. For example, you might want to limit the number of concurrent http calls in your application, and there could very well be independent things making such calls. You don't want to pass around naked semaphores.</div></div></div>