Re: [PATCH 2/5] thread-utils: add a threaded task queue

2015-08-28 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: +void add_task(struct task_queue *tq, + int (*fct)(struct task_queue *tq, void *task), Might make sense to typedef this... Maybe task_t? Let's not introduce user defined type that ends with _t that is seen globally. +

Re: [PATCH 2/5] thread-utils: add a threaded task queue

2015-08-27 Thread Johannes Schindelin
Hi Stefan, On 2015-08-27 02:52, Stefan Beller wrote: diff --git a/run-command.c b/run-command.c index 28e1d55..cb15cd9 100644 --- a/run-command.c +++ b/run-command.c @@ -668,6 +668,22 @@ int git_atexit(void (*handler)(void)) #endif +void setup_main_thread(void) [...] diff --git

Re: [PATCH 2/5] thread-utils: add a threaded task queue

2015-08-27 Thread Stefan Beller
On Thu, Aug 27, 2015 at 5:59 AM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Hi Stefan, On 2015-08-27 02:52, Stefan Beller wrote: diff --git a/run-command.c b/run-command.c index 28e1d55..cb15cd9 100644 --- a/run-command.c +++ b/run-command.c @@ -668,6 +668,22 @@ int

[PATCH 2/5] thread-utils: add a threaded task queue

2015-08-26 Thread Stefan Beller
This adds functionality to do work in a parallel threaded fashion while the boiler plate code for setting up threads and tearing them down as well as queuing up tasks is hidden behind the new API. Signed-off-by: Stefan Beller sbel...@google.com --- run-command.c | 29 +--- thread-utils.c |

[PATCH 2/5] thread-utils: add a threaded task queue

2015-08-25 Thread Stefan Beller
This adds functionality to do work in a parallel threaded fashion while the boiler plate code for setting up threads and tearing them down as well as queuing up tasks is hidden behind the new API. Signed-off-by: Stefan Beller sbel...@google.com --- run-command.c | 29 --- thread-utils.c |