MCPcopy Create free account
hub / github.com/F-Stack/f-stack / makeThreadKillable

Function makeThreadKillable

app/redis-6.2.6/src/server.c:3142–3145  ·  view source on GitHub ↗

Make the thread killable at any time, so that kill threads functions * can work reliably (default cancelability type is PTHREAD_CANCEL_DEFERRED). * Needed for pthread_cancel used by the fast memory test used by the crash report. */

Source from the content-addressed store, hash-verified

3140 * can work reliably (default cancelability type is PTHREAD_CANCEL_DEFERRED).
3141 * Needed for pthread_cancel used by the fast memory test used by the crash report. */
3142void makeThreadKillable(void) {
3143 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
3144 pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
3145}
3146
3147void initServer(void) {
3148 int j;

Callers 3

initServerFunction · 0.85
IOThreadMainFunction · 0.85
bioProcessBackgroundJobsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected