Re: [PATCH 0/5] forking and threading

2017-04-11 Thread Brandon Williams
On 04/11, Jonathan Nieder wrote: > Brandon Williams wrote: > Jonathan Tan had an idea about how to side-step the issue: what if > "grep" forks an appropriate set of child processes before creating any > threads and then communicates with those children using pipes? > Because no threads have been sp

Re: [PATCH 0/5] forking and threading

2017-04-11 Thread Jonathan Nieder
Brandon Williams wrote: > As far as I understand the only instance of threading and forking which exists > in the current code base is 'git grep --recurse-submodules', and the standard > builds against glibc shouldn't exhibit any of this deadlocking. I don't think we consider builds against glibc

[PATCH 0/5] forking and threading

2017-04-10 Thread Brandon Williams
Forking and threading is a difficult thing to get right due to potential deadlocks which can occur if one thread holds a lock while another forks. The resulting process will still have the lock in a locked state with no hope of it ever being released (since forking doesn't replicate the threads as