| 1138 | } |
| 1139 | |
| 1140 | void |
| 1141 | Log::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 |
nothing calls this directly
no test coverage detected