Generators
Pedro Lamarão
pedro.lamarao at prodist.com.br
Wed Nov 24 15:23:34 UTC 2021
Em qua., 24 de nov. de 2021 às 12:04, Alan Bateman <Alan.Bateman at oracle.com>
escreveu:
> On 24/11/2021 14:51, Pedro Lamarão wrote:
> > :
> > I have updated my generator experiments by forking loom
> > and adding code in the generators branch, java.base module,
> > java.util.generator package:
> >
> https://github.com/pedrolamarao/jdk-loom/tree/generators/src/java.base/share/classes/java/util/generator
> > The generator-based DER parser has been updated to use a build from the
> > above:
> > https://github.com/pedrolamarao/loom-asn
> > If you could provide some general feedback on this approach, that would
> be
> > awesome.
> > From this foundation, I think it would be very easy to provide an
> Iterable
> > generator.
> >
> It's great to experiment in this area. I suspect approaches along these
> lines will require the generator is to thread confined, it would
> otherwise be unsafe to yield on one thread and then be called again on
> a different thread.
>
Hi Alan,
would it be enough to require this by API contract
and check it on the inside with IllegalStateException on violations?
I'm assuming that thread in this case is the platform thread on which the
Continuation was initially constructed.
--
Pedro Lamarão
https://www.prodist.com.br
Securing Critical Systems
Tel: +55 11 4380-6585
Antes de imprimir esta mensagem e seus anexos, certifique-se que seja
realmente necessário.
Proteger o meio ambiente é nosso dever.
Before printing this e-mail or attachments, be sure it is necessary.
It is in our hands to protect the environment.
More information about the loom-dev
mailing list