MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / join_threads

Function join_threads

lua/sp.c:3319–3339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3317}
3318
3319static int join_threads(SP sp)
3320{
3321 Lua L = sp->lua;
3322 dbthread_type *dbthd, *tmp;
3323 LIST_FOREACH_SAFE(dbthd, &sp->dbthds, entries, tmp) {
3324 LIST_REMOVE(dbthd, entries);
3325 if (dbthd->status != THREAD_STATUS_JOINED) {
3326 dbthread_join_int(L, dbthd);
3327 }
3328 free_dbthread_type(dbthd);
3329 }
3330 if (sp->wait_cond) {
3331 Pthread_cond_destroy(sp->wait_cond);
3332 Pthread_mutex_destroy(sp->wait_lock);
3333 free(sp->wait_cond);
3334 free(sp->wait_lock);
3335 sp->wait_cond = NULL;
3336 sp->wait_lock = NULL;
3337 }
3338 return 0;
3339}
3340
3341static int dbstmt_free(Lua L)
3342{

Callers 2

run_spFunction · 0.85
run_funcFunction · 0.85

Calls 3

dbthread_join_intFunction · 0.85
free_dbthread_typeFunction · 0.85
freeFunction · 0.85

Tested by

no test coverage detected