Jeff King wrote: > On Sun, Jul 29, 2018 at 05:36:05PM +0200, Nguyễn Thái Ngọc Duy wrote: >> These extra comments should be make it easier to understand how to use >> locks in pack-objects delta search code. For reference, see >> >> 8ecce684a3 (basic threaded delta search - 2007-09-06) >> 384b32c09b (pack-objects: fix threaded load balancing - 2007-12-08) >> 50f22ada52 (threaded pack-objects: Use condition... - 2007-12-16) > > Thanks, I think this is an improvement. Yes, Reviewed-by: Jonathan Nieder <jrnieder@xxxxxxxxx> as well. Usually I would prefer to see comments about what lock protects some state where the state is defined, but here the state is normally not protected by any lock, since Git is single-threaded except in limited places (like pack-objects). So the documentation you added is in the right place today, even though it's an unusual place. Longer term, if we start using more multithreading in Git, we'll have to reconsider how to structure the locking anyway. Thanks, Jonathan