On Feb 10, 2011, at 17:19, Andy Wingo wrote: >> procproc.c: There's a mutex to protect overrides, but it looks like >> set-procedure-property! doesn't use it correctly; it should look more >> like set-object-property! does. > > I'm going to punt on this one, since it cannot access the hash table in > an inconsistent state, and I don't care enough about what happens when > multiple threads start changing the same procedure property (a fairly > legacy interface) at once. Furthermore there is always (assq-set! > (procedure-properties foo) 'bar) to contend with...
It doesn't need to be the same property; I think different threads setting different new properties on a procedure in parallel may lose. Both read the old property list, then each in turn acquires the lock and sets a new property list consisting of the new property added to the original list. So the second one "wins", and the first update disappears. Ken