MCPcopy Create free account
hub / github.com/apache/trafficserver / create_threads

Method create_threads

src/proxy/logging/Log.cc:1140–1169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1138}
1139
1140void
1141Log::create_threads()
1142{
1143 char desc[64];
1144 preproc_notify = new EventNotify[preproc_threads];
1145
1146 size_t stacksize;
1147 REC_ReadConfigInteger(stacksize, "proxy.config.thread.default.stacksize");
1148
1149 // start the preproc threads
1150 //
1151 // no need for the conditional var since it will be relying on
1152 // on the event system.
1153 for (int i = 0; i < preproc_threads; i++) {
1154 Continuation *preproc_cont = new LoggingPreprocContinuation(i);
1155 snprintf(desc, sizeof(desc), "[LOG_PREPROC %d]", i);
1156 eventProcessor.spawn_thread(preproc_cont, desc, stacksize);
1157 }
1158
1159 // Now, only one flush thread is supported.
1160 // TODO: Enable multiple flush threads, such as
1161 // one flush thread per file.
1162 //
1163 flush_notify = new EventNotify;
1164 flush_data_list = new InkAtomicList;
1165
1166 ink_atomiclist_init(flush_data_list, "Logging flush buffer list", 0);
1167 Continuation *flush_cont = new LoggingFlushContinuation(0);
1168 eventProcessor.spawn_thread(flush_cont, "[LOG_FLUSH]", stacksize);
1169}
1170
1171/*-------------------------------------------------------------------------
1172 Log::access

Callers

nothing calls this directly

Calls 2

ink_atomiclist_initFunction · 0.85
spawn_threadMethod · 0.80

Tested by

no test coverage detected