Re: [Python-ideas] New PyThread_tss_ C-API for CPython

2016-12-20 Thread Nick Coghlan
On 21 December 2016 at 01:35, Masayuki YAMAMOTO wrote: > 2016-12-20 22:30 GMT+09:00 Erik Bray : > >> This is probably an implementation detail, but ISTM that even with >> PyThread_call_once, it will be necessary to reset any used once_flags >> manually in PyOS_AfterFork, essentially for the same

[Python-ideas] api suggestions for the cProfile module

2016-12-20 Thread Thane Brimhall
I use cProfile a lot, and would like to suggest three backwards-compatible improvements to the API. 1: When using cProfile on a specific piece of code I often use the enable() and disable() methods. It occurred to me that this would be an obvious place to use a context manager. 2: Enhance the `pr

Re: [Python-ideas] New PyThread_tss_ C-API for CPython

2016-12-20 Thread Masayuki YAMAMOTO
2016-12-20 22:30 GMT+09:00 Erik Bray : > This is probably an implementation detail, but ISTM that even with > PyThread_call_once, it will be necessary to reset any used once_flags > manually in PyOS_AfterFork, essentially for the same reason the > autoTLSkey is reset there currently... > Deleting

Re: [Python-ideas] New PyThread_tss_ C-API for CPython

2016-12-20 Thread Erik Bray
On Tue, Dec 20, 2016 at 9:26 AM, Nick Coghlan wrote: > On 20 December 2016 at 00:53, Erik Bray wrote: >> >> On Mon, Dec 19, 2016 at 3:45 PM, Erik Bray wrote: >> >> Likewise - we know the status quo isn't right, and the proposed change >> >> addresses that. In reviewing the patch on the tracker,

Re: [Python-ideas] New PyThread_tss_ C-API for CPython

2016-12-20 Thread Nick Coghlan
On 20 December 2016 at 00:53, Erik Bray wrote: > On Mon, Dec 19, 2016 at 3:45 PM, Erik Bray wrote: > >> Likewise - we know the status quo isn't right, and the proposed change > >> addresses that. In reviewing the patch on the tracker, the one downside > I've > >> found is that due to "pthread_ke