Re: [gentoo-portage-dev] [PATCH] bindbapi: add reentrant lock method (bug 685236)

2019-05-08 Thread Alec Warner
On Wed, May 8, 2019 at 2:05 PM Zac Medico wrote: > On 5/7/19 1:01 PM, Zac Medico wrote: > > On 5/7/19 7:55 AM, Alec Warner wrote: > > > >> Also curious why we are not implementing enter and exit so we can avoid > >> unbalanced pairs by using context managers. > >> > >> e.g. in match(), we could

Re: [gentoo-portage-dev] [PATCH] bindbapi: add reentrant lock method (bug 685236)

2019-05-08 Thread Zac Medico
On 5/7/19 1:01 PM, Zac Medico wrote: > On 5/7/19 7:55 AM, Alec Warner wrote: > >> Also curious why we are not implementing enter and exit so we can avoid >> unbalanced pairs by using context managers. >> >> e.g. in match(), we could likely write: >> >> with self.dbapi.lock(): >>   # try to match