Nick Coghlan wrote:
For synchronous code, that's a relatively easy burden to push back
onto the programmer - assuming fair thread scheduling, a with
statement can ensure reliably ensure prompt resource cleanup.
That assurance goes out the window as soon as you explicitly pause
code execution ins
Hi Oscar,
I don't think PyPy is in breach of the language spec here. Python made
a decision a long time ago to shun RAII-style implicit cleanup in
favour if with-style explicit cleanup.
The solution to this problem is to move resource management outside of
the generator functions. This is true f
On 4 September 2016 at 04:38, Oscar Benjamin wrote:
> On 3 September 2016 at 16:42, Nick Coghlan wrote:
>> On 2 September 2016 at 19:13, Nathaniel Smith wrote:
>>> This works OK on CPython because the reference-counting gc will call
>>> handle.__del__() at the end of the scope (so on CPython it'
Hi Nathaniel,
On 2016-09-02 2:13 AM, Nathaniel Smith wrote:
On Thu, Sep 1, 2016 at 3:34 PM, Yury Selivanov wrote:
Hi,
I've spent quite a while thinking and experimenting with PEP 525 trying to
figure out how to make asynchronous generators (AG) finalization reliable.
I've tried to replace the
On 3 September 2016 at 16:42, Nick Coghlan wrote:
> On 2 September 2016 at 19:13, Nathaniel Smith wrote:
>> This works OK on CPython because the reference-counting gc will call
>> handle.__del__() at the end of the scope (so on CPython it's at level
>> 2), but it famously causes huge problems whe
On 2 September 2016 at 19:13, Nathaniel Smith wrote:
> This works OK on CPython because the reference-counting gc will call
> handle.__del__() at the end of the scope (so on CPython it's at level
> 2), but it famously causes huge problems when porting to PyPy with
> it's much faster and more sophi
On Thu, Sep 1, 2016 at 3:34 PM, Yury Selivanov wrote:
> Hi,
>
> I've spent quite a while thinking and experimenting with PEP 525 trying to
> figure out how to make asynchronous generators (AG) finalization reliable.
> I've tried to replace the callback for GCed with a callback to intercept
> first