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

Function ThreadPools_AddWorkWriter

src/util/thpool/pools.c:154–166  ·  view source on GitHub ↗

add task for writer thread

Source from the content-addressed store, hash-verified

152
153// add task for writer thread
154int ThreadPools_AddWorkWriter
155(
156 void (*function_p)(void *),
157 void *arg_p,
158 int force
159) {
160 ASSERT(_writers_thpool != NULL);
161
162 // make sure there's enough room in thread pool queue
163 if(thpool_queue_full(_writers_thpool) && !force) return THPOOL_QUEUE_FULL;
164
165 return thpool_add_work(_writers_thpool, function_p, arg_p);
166}
167
168void ThreadPools_SetMaxPendingWork(uint64_t val) {
169 if(_readers_thpool != NULL) thpool_set_jobqueue_cap(_readers_thpool, val);

Callers 3

_DelegateWriterFunction · 0.85

Calls 2

thpool_queue_fullFunction · 0.85
thpool_add_workFunction · 0.85

Tested by 1