From: Thomas Rast Date: Mon, 12 Dec 2011 21:16:07 +0000 (+0100) Subject: grep: enable threading with -p and -W using lazy attribute lookup X-Git-Tag: v1.7.9-rc0~23^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/0579f91dd74a0902e52d1e6e839cc31b99f12cfc?ds=inline;hp=0579f91dd74a0902e52d1e6e839cc31b99f12cfc grep: enable threading with -p and -W using lazy attribute lookup Lazily load the userdiff attributes in match_funcname(). Use a separate mutex around this loading to protect the (not thread-safe) attributes machinery. This lets us re-enable threading with -p and -W while reducing the overhead caused by looking up attributes. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano ---