>> So that you are right. It is not RCU. It only uses similar technique as RCU >> uses for free-ing old copy of data. >> >> It is based on assumption that an object is typicaly used by single thread. > > Which thread owns builtins? Or module dictionaries? If two threads are > running the same function and share no state except their globals, won't > they constantly be thrashing on the module dictionary? Likewise, if the > same method is running in two different threads, won't they thrash on the > class dictionary?
As I've written in "Big reader lock" paragraph of the original proposal, these objects could be handled by not blocking in read path and wait for all other threads to "come home" before modifying. The selection between locking mode could be selected either by something like __locking__ or by detecting the mode. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com