threads

Tim Peters tim_one at email.msn.com
Fri Jun 4 21:42:17 EDT 1999


[Jeremy Hylton, on why free-threading may slow things down]
> If I recall correctly, the problem is that taking away one big lock
> usually requires introducing lots of little locks.  (There's some kind
> of conservation of concurrency going on.)  Right now, there is no need
> to have locks on access to builtin types like dictionaries, because
> only a single thread can hold the interpreter lock anyway.  When that
> goes away, you need to add lots of fine-grained locking on the builtin
> types.

Refcount incref/decref are also unsafe without a lock, and one of those
occurs even more often than it's suggested "real GC" would eliminate the
need for them <wink>.

the-guarantee-of-exclusion-simplifies-much-of-the-implementation-ly y'rs  -
tim






More information about the Python-list mailing list