| 110 | } cli_progress_race_arg_t; |
| 111 | |
| 112 | static void *cli_progress_race_worker(void *opaque) { |
| 113 | cli_progress_race_arg_t *arg = opaque; |
| 114 | char counts[128]; |
| 115 | char progress[128]; |
| 116 | (void)snprintf(counts, sizeof(counts), "level=info msg=gbuf.dump nodes=%d edges=%d", |
| 117 | 1000 + arg->worker_id, 2000 + arg->worker_id); |
| 118 | (void)snprintf(progress, sizeof(progress), |
| 119 | "level=info msg=parallel.extract.progress done=%d total=%d", arg->worker_id + 1, |
| 120 | CLI_PROGRESS_RACE_THREADS); |
| 121 | |
| 122 | while (!atomic_load_explicit(arg->start, memory_order_acquire)) { |
| 123 | cbm_usleep(100); |
| 124 | } |
| 125 | for (int round = 0; round < CLI_PROGRESS_RACE_ROUNDS; round++) { |
| 126 | cbm_progress_sink_fn(counts); |
| 127 | cbm_progress_sink_fn(progress); |
| 128 | } |
| 129 | return NULL; |
| 130 | } |
| 131 | |
| 132 | /* A normal run checks that concurrent callback delivery remains usable. More |
| 133 | * importantly, this is the focused TSan guard for progress-sink state: all |
nothing calls this directly
no test coverage detected