Beispiel #1
0
 void clear(void) {
   MRN_DBUG_ENTER_METHOD();
   while (pool_) {
     grn_ctx *ctx = static_cast<grn_ctx *>(pool_->data);
     grn_ctx_close(ctx);
     list_pop(pool_);
   }
   DBUG_VOID_RETURN;
 }
static void
cleanup_httpd_thread(thd_data *thd) {
  if (thd->log_file) {
    fclose(thd->log_file);
  }
  if (thd->httpd) {
    evhttp_free(thd->httpd);
  }
  if (thd->zmq_sock) {
    zmq_close(thd->zmq_sock);
  }
  grn_obj_unlink(thd->ctx, &(thd->cmd_buf));
  if (thd->ctx) {
    grn_ctx_close(thd->ctx);
  }
  event_base_free(thd->base);
}