| 336 | } cli_progress_race_arg_t; |
| 337 | |
| 338 | static void *cli_progress_race_worker(void *opaque) { |
| 339 | cli_progress_race_arg_t *arg = opaque; |
| 340 | char counts[128]; |
| 341 | char progress[128]; |
| 342 | (void)snprintf(counts, sizeof(counts), "level=info msg=gbuf.dump nodes=%d edges=%d", |
| 343 | 1000 + arg->worker_id, 2000 + arg->worker_id); |
| 344 | (void)snprintf(progress, sizeof(progress), |
| 345 | "level=info msg=parallel.extract.progress done=%d total=%d", arg->worker_id + 1, |
| 346 | CLI_PROGRESS_RACE_THREADS); |
| 347 | |
| 348 | while (!atomic_load_explicit(arg->start, memory_order_acquire)) { |
| 349 | cbm_usleep(100); |
| 350 | } |
| 351 | for (int round = 0; round < CLI_PROGRESS_RACE_ROUNDS; round++) { |
| 352 | cbm_progress_sink_fn(counts); |
| 353 | cbm_progress_sink_fn(progress); |
| 354 | } |
| 355 | return NULL; |
| 356 | } |
| 357 | |
| 358 | /* A normal run checks that concurrent callback delivery remains usable. More |
| 359 | * importantly, this is the focused TSan guard for progress-sink state: all |
nothing calls this directly
no test coverage detected