MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / thpool_pause

Function thpool_pause

src/util/thpool/thpool.c:232–242  ·  view source on GitHub ↗

Pause all threads in threadpool */

Source from the content-addressed store, hash-verified

230
231/* Pause all threads in threadpool */
232void thpool_pause(thpool_* thpool_p) {
233 int n;
234 pthread_t caller = pthread_self();
235
236 for(n = 0; n < thpool_p->num_threads_alive; n++) {
237 // do not pause caller
238 if(thpool_p->threads[n]->pthread != caller) {
239 pthread_kill(thpool_p->threads[n]->pthread, SIGUSR2);
240 }
241 }
242}
243
244/* Resume all threads in threadpool */
245void thpool_resume(thpool_* thpool_p) {

Callers 1

ThreadPools_PauseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected