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

Function killIOThreads

app/redis-6.2.6/src/networking.c:3542–3557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3540}
3541
3542void killIOThreads(void) {
3543 int err, j;
3544 for (j = 0; j < server.io_threads_num; j++) {
3545 if (io_threads[j] == pthread_self()) continue;
3546 if (io_threads[j] && pthread_cancel(io_threads[j]) == 0) {
3547 if ((err = pthread_join(io_threads[j],NULL)) != 0) {
3548 serverLog(LL_WARNING,
3549 "IO thread(tid:%lu) can not be joined: %s",
3550 (unsigned long)io_threads[j], strerror(err));
3551 } else {
3552 serverLog(LL_WARNING,
3553 "IO thread(tid:%lu) terminated",(unsigned long)io_threads[j]);
3554 }
3555 }
3556 }
3557}
3558
3559void startThreadedIO(void) {
3560 serverAssert(server.io_threads_active == 0);

Callers 1

killThreadsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected