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

Function dequeue

ds4_server.c:11052–11065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11050 /* An in-flight backend call still owns the session. Even during
11051 * shutdown or client cancellation, wait for that safe boundary before
11052 * the stack-owned job and its cancellation callback can be released. */
11053 pthread_cond_wait(&s->model_cv, &s->model_mu);
11054 }
11055 int rc = slot->decode_rc;
11056 if (g_stop_requested && rc == 0) rc = DS4_SESSION_SYNC_INTERRUPTED;
11057 if (rc != 0 && err && errlen) {
11058 snprintf(err, errlen, "%s",
11059 g_stop_requested ? "shutdown requested" :
11060 (slot->decode_err[0] ? slot->decode_err : "decode interrupted"));
11061 }
11062 slot->decode_done = false;
11063 pthread_mutex_unlock(&s->model_mu);
11064 return rc;
11065}
11066
11067static long server_decode_coalesce_us(void) {
11068 long us = 2000;

Callers 1

worker_mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected