parallel-checkout: support progress displaying

Original-patch-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Matheus Tavares
2021-04-18 21:14:56 -03:00
committed by Junio C Hamano
parent 7531e4b66e
commit 1c4d6f46be
3 changed files with 43 additions and 7 deletions

View File

@ -5,6 +5,7 @@
struct cache_entry;
struct checkout;
struct progress;
/****************************************************************
* Users of parallel checkout
@ -31,13 +32,15 @@ void init_parallel_checkout(void);
* for later write and return 0.
*/
int enqueue_checkout(struct cache_entry *ce, struct conv_attrs *ca);
size_t pc_queue_size(void);
/*
* Write all the queued entries, returning 0 on success. If the number of
* entries is smaller than the specified threshold, the operation is performed
* sequentially.
*/
int run_parallel_checkout(struct checkout *state, int num_workers, int threshold);
int run_parallel_checkout(struct checkout *state, int num_workers, int threshold,
struct progress *progress, unsigned int *progress_cnt);
/****************************************************************
* Interface with checkout--worker