Re: Lock acquisition by the same thread - deadlock protection

2020-03-15 Thread Dieter Maurer
Cameron Simpson wrote at 2020-3-15 10:17 +1100: >On 12Mar2020 20:08, Dieter Maurer wrote: > ... >>The documentation for the basic lock explicitely allows >>lock release by a foreign thread. >>As I understand the documentation, this lock type is by design >>very basic - a mechanism to implement hig

Re: Lock acquisition by the same thread - deadlock protection

2020-03-14 Thread Cameron Simpson
On 12Mar2020 20:08, Dieter Maurer wrote: Yonatan wrote at 2020-3-11 16:24 +0200: That code I'm talking about didn't require a reentrant lock - the algorithm really wasn't reentrant. Let me clarify my point: I'm wondering why the non-reentrant lock doesn't raise an exception immediately on this

Re: Lock acquisition by the same thread - deadlock protection

2020-03-12 Thread Dieter Maurer
Yonatan wrote at 2020-3-11 16:24 +0200: >That code I'm talking about didn't require a reentrant lock - the >algorithm really wasn't reentrant. > >Let me clarify my point: I'm wondering why the non-reentrant lock >doesn't raise an exception immediately on this >erroneous situation. >I thought it cou

Re: Lock acquisition by the same thread - deadlock protection

2020-03-11 Thread Barry Scott
> On 11 Mar 2020, at 14:24, Yonatan wrote: > > That code I'm talking about didn't require a reentrant lock - the > algorithm really wasn't reentrant. > > Let me clarify my point: I'm wondering why the non-reentrant lock > doesn't raise an exception immediately on this > erroneous situation. >

Re: Lock acquisition by the same thread - deadlock protection

2020-03-11 Thread Yonatan
That code I'm talking about didn't require a reentrant lock - the algorithm really wasn't reentrant. Let me clarify my point: I'm wondering why the non-reentrant lock doesn't raise an exception immediately on this erroneous situation. I thought it could be altered, or at least we could add an opti

Re: Lock acquisition by the same thread - deadlock protection

2020-03-10 Thread Barry Scott
> On 9 Mar 2020, at 22:53, Yonatan Goldschmidt > wrote: > > I recently debugged a program hang, eventually finding out it's a deadlock of > a single thread, > resulting from my usage of 2 libraries. One of them - call it library A - is > reentrant & runs code in > GC finalizers, while the o

Re: Lock acquisition by the same thread - deadlock protection

2020-03-09 Thread Souvik Dutta
Sooyyy it was not meant to you On Tue, 10 Mar, 2020, 8:00 am Souvik Dutta, wrote: > This should be what you need. > https://python-reference.readthedocs.io/en/latest/docs/functions/super.html > > On Tue, 10 Mar, 2020, 7:02 am Yonatan Goldschmidt, < > yon.goldschm...@gmail.com> wrote: > >> I

Re: Lock acquisition by the same thread - deadlock protection

2020-03-09 Thread Souvik Dutta
This should be what you need. https://python-reference.readthedocs.io/en/latest/docs/functions/super.html On Tue, 10 Mar, 2020, 7:02 am Yonatan Goldschmidt, < yon.goldschm...@gmail.com> wrote: > I recently debugged a program hang, eventually finding out it's a deadlock > of a single thread, > res

Lock acquisition by the same thread - deadlock protection

2020-03-09 Thread Yonatan Goldschmidt
I recently debugged a program hang, eventually finding out it's a deadlock of a single thread, resulting from my usage of 2 libraries. One of them - call it library A - is reentrant & runs code in GC finalizers, while the other - library B - is not reentrant at all. Library B held one of its `thr