Commit 57b33b641c4fe9ecd381906cdc6fcf1187db2b1e

Stefan Sperling 2019-07-08T18:58:35

fix thread synchronization during 'tog log' search; more speed-up

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/tog/tog.c b/tog/tog.c
index 32a7137..e530147 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -1786,8 +1786,8 @@ search_next_log_view(struct tog_view *view)
 			 * allowing the main loop to make progress. Search
 			 * will resume at s->search_entry once we come back.
 			 */
-			s->thread_args.commits_needed = 1;
-			return trigger_log_thread(0,
+			s->thread_args.commits_needed++;
+			return trigger_log_thread(1,
 			    &s->thread_args.commits_needed,
 			    &s->thread_args.log_complete,
 			    &s->thread_args.need_commits);