static void do_line(buf *b, doc *d, int _l) { int i; line *l = &d->l[_l]; put(b, "l %d\n", l->n); for (i = 0; i < l->size; i++) do_item(b, d, _l, i); }
void HttpLoader::work_thread(HttpLoader *self) { while (!self->_should_exit) { auto item = self->_work_queue.dequeue(); auto curl_wrapper = self->_curl_wrapper; if (item == nullptr || curl_wrapper == nullptr) { continue; } do_item(item, curl_wrapper); } }