[External] : Re: Single Thread Continuation

Robert Engels rengels at ix.netcom.com
Tue Jul 11 17:19:44 UTC 2023


Not quite sure what probably means in this case. 

> On Jul 11, 2023, at 11:31 AM, Andrew Haley <aph-open at littlepinkcloud.com> wrote:
> 
> On 7/11/23 16:32, Robert Engels wrote:
>> I don’t think it is any different than a database connection and a result set. You CAN close these but typically the system will perform fine if you don’t. The “costly” backend usually has alternative ways of dealing with “lazy” cleanup.
> 
> That seems like a nitpick, IMO. Some resources, especially file handles,
> are scarce. We used to think we could rely on garbage collection to close
> them, but we learned better.
> 
> > To elaborate - since the developer does not have access to the returned
> > iterator in the iterable for each - it is safe to close when it goes out of scope.
> 
> Probably. :-)
> 
> -- 
> 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