[External] : Re: Single Thread Continuation

Andrew Haley aph-open at littlepinkcloud.com
Tue Jul 11 13:57:05 UTC 2023


On 7/11/23 14:49, Robert Engels wrote:
> You don’t need a closable iterator. It is trivial to modify the code I provided to make the outer generator instance AutoClosable to be used with TwR and if the iterator is used after the outer is closed it fails with an IllegalStateException (or NoSuchElementException with ‘generator closed’ as the cause.

Sure. All I'm saying is that a generator must be closable in some way and
that the consumer is responsible for doing that.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the loom-dev mailing list