<div dir="ltr">Hi Robert<div><br></div><div>The primary use case should not be identified only by the immediate use case of people working in the same area.</div><div>I have talked with lead developers of several companies that produce mainstream and quite popular products (which I can not name for confidentiality reasons, though I completely understand that my claim does not look very persuasive in such form), who confirmed that they do need the support of custom schedulers for efficient integration of io_uring based solutions. </div><div><br></div><div>As you can see in this thread there are also other reasons aside from usage of io_uring why custom schedulers must be implemented.<br></div><div>Which together form quite a big amount of use cases to pay attention to.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 3, 2023 at 1:59 AM Robert Engels <<a href="mailto:rengels@ix.netcom.com">rengels@ix.netcom.com</a>> wrote:<br></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">When you have virtual threads there is no need for generators - it is simply queues. The typical generator is simply implemented as a task that puts values on a queue with blocking semantics. The rest is syntactic sugar. </div><div dir="ltr"><br><blockquote type="cite">On Jul 2, 2023, at 5:53 PM, Attila Kelemen <<a href="mailto:attila.kelemen85@gmail.com" target="_blank">attila.kelemen85@gmail.com</a>> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div dir="ltr">Robert Engels <<a href="mailto:rengels@ix.netcom.com" target="_blank">rengels@ix.netcom.com</a>> ezt írta (időpont: 2023. júl. 2., V, 23:52):<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">I would fully avoid all of these isolated use case. Virtual threads solves the primary need for Java - thread per connection. <br>
<br>
All of these other uses can be done in other languages - don’t pollute Java with less useful idioms that solves peoples need to not have to learn CS. <br><br></blockquote><div><br></div><div>I can't see how adding the possibility for generators would be "less useful idioms that solves peoples need to not have to learn CS". It has nothing to do with that, and it would be terribly useful, because there are a lot of cases, where you already have APIs that can "for-each" over something, and these generators would provide considerable value. And even when you could implement an `Iterator`, implementing it certainly doesn't fall into a big intelectual challenge, rather it is just cumbersome for basically no gain. In fact, if there is any reason to avoid adding features is because people might find it complicated to understand, and not as you imply that it would make it easy for less qualified people (which I don't even understand why would be an issue).</div><div><br></div><div>Attila</div></div></div>
</div></blockquote></div></blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Best regards,<br>Andrii Lomakin.<br><br></div></div></div></div>