MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / background_thread_create

Function background_thread_create

deps/jemalloc/src/background_thread.c:592–602  ·  view source on GitHub ↗

Create a new background thread if needed. */

Source from the content-addressed store, hash-verified

590
591/* Create a new background thread if needed. */
592bool
593background_thread_create(tsd_t *tsd, unsigned arena_ind) {
594 assert(have_background_thread);
595
596 bool ret;
597 malloc_mutex_lock(tsd_tsdn(tsd), &background_thread_lock);
598 ret = background_thread_create_locked(tsd, arena_ind);
599 malloc_mutex_unlock(tsd_tsdn(tsd), &background_thread_lock);
600
601 return ret;
602}
603
604bool
605background_threads_enable(tsd_t *tsd) {

Callers 3

malloc_init_hardFunction · 0.70

Calls 4

malloc_mutex_lockFunction · 0.50
tsd_tsdnFunction · 0.50
malloc_mutex_unlockFunction · 0.50

Tested by

no test coverage detected