yield return based on Coroutines

Robert Engels rengels at ix.netcom.com
Tue Aug 29 12:26:55 UTC 2023


Not to start this up again, but I also showed how it would be easy to have the generator work with TwR in order to allow explicit close. 

> On Aug 29, 2023, at 7:22 AM, Attila Kelemen <attila.kelemen85 at gmail.com> wrote:
> 
> 
> As it turned out, I don't think there was much disagreement in the first place. Because - as far as I remember - nobody wanted a language level construct. I personally only wished the JDK to provide methods and interfaces for this. The only question is that there are multiple ways to implement this with different implications, and I believe the JDK should provide at least 2 different kinds: One which requires no close, and no longer referenced iterators would just abandon their VT forever (somewhat dangerous, but there a lot of generators that would not be hurt by that), and another one which can be closed explicitly. Anyway, before talking about other specific details, we would need that the JDK puts it up on the roadmap in the first place.
> 
> Robert Engels <rengels at ix.netcom.com> ezt írta (időpont: 2023. aug. 28., H, 13:34):
>> I let it die :) - I thought because I proved that there was no difference in syntax or implementation by using virtual threads directly rather than requiring a new language continuation construct. There was some minor disagreement left that a “language continuation” could allow slightly more deterministic collection but I believe that was dismissed as being no different than other resource management in the JDK.  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20230829/4c7af7cd/attachment.htm>


More information about the loom-dev mailing list