Message12918

Author jeff.allen
Recipients FraOrolo, jeff.allen, zyasoft
Date 2020-01-25.10:40:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1579948813.42.0.860999139542.issue2834@roundup.psfhosted.org>
In-reply-to
Content
[get the name right!]

I managed to trap an example of this going wrong. I hope I've now got the right error. The problem is essentially that a recursive call to PyType.fromClass() is capable of premature publication. Such a call occurs during construction of the MRO. Any thread not already waiting inside the type system will then pick up an incomplete PyType from the ClassValue.

We do need those incomplete values internally, in order to build structures like the MRO that refer to the object that contains them.

We need a way to allow PyType.fromClass to return an incomplete type to the unique thread already working, while not binding it for other threads to find. I notice that it is allowable for computeValue() to throw an exception and no value is then bound, which may provide the back-channel I need.
History
Date User Action Args
2020-01-25 10:40:13jeff.allensetmessageid: <1579948813.42.0.860999139542.issue2834@roundup.psfhosted.org>
2020-01-25 10:40:13jeff.allensetrecipients: + jeff.allen, zyasoft, FraOrolo
2020-01-25 10:40:13jeff.allenlinkissue2834 messages
2020-01-25 10:40:13jeff.allencreate