Skip to content

Commit 10f2935

Browse files
pks-tgitster
authored andcommitted
reftable/stack: stop using sleep_millisec()
Refactor our use of `sleep_millisec()` by open-coding it with poll(3p), which is the current implementation of this function. Ideally, we'd use a more direct way to sleep, but there is no equivalent to sleep(3p) that would accept milliseconds as input. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 712f6cf commit 10f2935

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reftable/stack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ static int reftable_stack_reload_maybe_reuse(struct reftable_stack *st,
524524
fd = -1;
525525

526526
delay = delay + (delay * reftable_rand()) / UINT32_MAX + 1;
527-
sleep_millisec(delay);
527+
poll(NULL, 0, delay);
528528
}
529529

530530
out:

0 commit comments

Comments
 (0)