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

Function ThreadPools_AddWorkReader

src/util/thpool/pools.c:139–151  ·  view source on GitHub ↗

adds a read task

Source from the content-addressed store, hash-verified

137
138// adds a read task
139int ThreadPools_AddWorkReader
140(
141 void (*function_p)(void *), // function to run
142 void *arg_p, // function arguments
143 int force // true will add task even if internal queue is full
144) {
145 ASSERT(_readers_thpool != NULL);
146
147 // make sure there's enough room in thread pool queue
148 if(!force && thpool_queue_full(_readers_thpool)) return THPOOL_QUEUE_FULL;
149
150 return thpool_add_work(_readers_thpool, function_p, arg_p);
151}
152
153// add task for writer thread
154int ThreadPools_AddWorkWriter

Callers 2

CommandDispatchFunction · 0.85

Calls 2

thpool_queue_fullFunction · 0.85
thpool_add_workFunction · 0.85

Tested by 1