MCPcopy Create free account
hub / github.com/antirez/ds4 / dist_worker_prefetch_depth

Function dist_worker_prefetch_depth

ds4_distributed.c:724–736  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

722}
723
724static uint32_t dist_worker_prefetch_depth(void) {
725 uint32_t depth = 2;
726 const char *env = getenv("DS4_DIST_WORKER_PREFETCH_DEPTH");
727 if (env && env[0]) {
728 errno = 0;
729 char *end = NULL;
730 long v = strtol(env, &end, 10);
731 if (errno == 0 && end != env && *end == '\0' && v >= 1 && v <= 8) {
732 depth = (uint32_t)v;
733 }
734 }
735 return depth;
736}
737
738static uint32_t dist_worker_forward_window(void) {
739 uint32_t depth = 4;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected