Hit "Reply" instead of "Reply
All" last night, oops.� Forwarding to the list for posterity's
sakes.
/arry
-------- Forwarded Message --------
Subject:
|
Re: [Python-Dev] PyWeakref_GetObject() borrows its
reference from... whom? |
Date: |
Mon, 10 Oct 2016 23:01:10 +0200 |
From: |
Larry Hastings |
To: |
Nathaniel Smith |
On 10/10/2016 07:50 PM, Nathaniel Smith wrote:
If we say that borrowing reference from a dict is one of the things
that counts as mucking about with that dict, and thus requires you to
hold the dict lock for as long as you hold the borrowed reference,
then all should be well.
That's not how locking works in the Gilectomy right now.� If you
call PyDict_GetItem(), it locks the dict at the beginning, then
looks up the thingy, then releases the lock just before
returning.� It's hard for me to imagine how the dict would
magically know when it could drop the borrowed reference returned
by PyDict_GetItem().
I assume Larry is way ahead of us on this,
I would say "that's your first mistake!" but I bet you've made
others.� Anyway, tbh most of the time I feel awfully unqualified
to work on the Gilectomy.
Fools rush in,
/arry