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

Function thpool_get_thread_id

src/util/thpool/thpool.c:262–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262int thpool_get_thread_id(thpool_* thpool_p, pthread_t pthread) {
263 for(int i = 0; i < thpool_p->num_threads_alive; i++) {
264 thread *thread = thpool_p->threads[i];
265 if(thread->pthread == pthread) return thread->id;
266 }
267
268 // Could not locate thread.
269 return -1;
270}
271
272// return true if thread pool internal queue is full with pending work
273bool thpool_queue_full(thpool_* thpool_p) {

Callers 1

ThreadPools_GetThreadIDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected