MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / checkClientPauseTimeoutAndReturnIfPaused

Function checkClientPauseTimeoutAndReturnIfPaused

src/networking.cpp:4039–4046  ·  view source on GitHub ↗

Checks if the current client pause has elapsed and unpause clients * if it has. Also returns true if clients are now paused and false * otherwise. */

Source from the content-addressed store, hash-verified

4037 * if it has. Also returns true if clients are now paused and false
4038 * otherwise. */
4039int checkClientPauseTimeoutAndReturnIfPaused(void) {
4040 if (!areClientsPaused())
4041 return 0;
4042 if (g_pserver->client_pause_end_time < g_pserver->mstime) {
4043 unpauseClients();
4044 }
4045 return areClientsPaused();
4046}
4047
4048/* This function is called by Redis in order to process a few events from
4049 * time to time while blocked into some not interruptible operation.

Callers 9

expireIfNeededFunction · 0.85
resetManualFailoverFunction · 0.85
isSafeToPerformEvictionsFunction · 0.85
replicationCronFunction · 0.85
activeExpireCycleCoreMethod · 0.85
serverCronFunction · 0.85
serverCronLiteFunction · 0.85
beforeSleepFunction · 0.85
RM_AvoidReplicaTrafficFunction · 0.85

Calls 2

areClientsPausedFunction · 0.85
unpauseClientsFunction · 0.85

Tested by

no test coverage detected