|
|
Log in / Subscribe / Register

Modifying the Python object model

Modifying the Python object model

Posted May 17, 2018 10:06 UTC (Thu) by roc (subscriber, #30627)
In reply to: Modifying the Python object model by Cyberax
Parent article: Modifying the Python object model

Sure, but the Python interpreter can't share object between threads and the article doesn't say anything about changing that.


to post comments

Modifying the Python object model

Posted May 18, 2018 14:59 UTC (Fri) by mb (subscriber, #50428) [Link] (1 responses)

Of course objects can be shared. That is the whole point of threads.

Modifying the Python object model

Posted May 18, 2018 22:00 UTC (Fri) by roc (subscriber, #30627) [Link]

OK that's true, but all access to Python objects is protected by the GIL so there is no need to use atomic operations to modify the refcount. (I should have said that objects can't be shared by concurrently executing threads.)


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds