threads

Jeremy Hylton jeremy at cnri.reston.va.us
Fri Jun 4 17:41:46 EDT 1999


>>>>> "HN" == Hrvoje Niksic <hniksic at srce.hr> writes:

  [Somebody wrote:]
  [Since the mailing list to news gateway is working again, Gordon's
   messages are probably in DejaNews again.  So you can check there.]
  >> > If Greg's patches haven't been applied to the base, surely mine
  >> > would not be either.
  >> 
  >> As I recall, Greg's patches didn't make it because (1) they were
  >> late and (2) they were slow.

  HN> Interesting.  What was the source of slowness?  (If you _remove_
  HN> locks, I'd expect things to go faster, even in a single-threaded
  HN> world.)  Maybe the patches simply introduced a different set of
  HN> problems?

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.

Jeremy




More information about the Python-list mailing list