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

Function makeThreadKillable

src/server.cpp:3793–3796  ·  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

3791 * can work reliably (default cancelability type is PTHREAD_CANCEL_DEFERRED).
3792 * Needed for pthread_cancel used by the fast memory test used by the crash report. */
3793void makeThreadKillable(void) {
3794 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
3795 pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
3796}
3797
3798static void initNetworkingThread(int iel, int fReusePort)
3799{

Callers 3

bioProcessBackgroundJobsFunction · 0.85
initNetworkingThreadFunction · 0.85
initServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected