view src/indexer/worker-pool.h @ 22325:e01bc3015b2f

lib-index: Check .log.2 rotation only when syncing Instead of also whenever appending transactions to .log file. This shouldn't change the behavior much, and it's needed for the following change to work correctly.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Tue, 11 Jul 2017 15:33:56 +0300
parents 221d159befec
children
line wrap: on
line source

#ifndef WORKER_POOL_H
#define WORKER_POOL_H

#include "indexer.h"

struct worker_connection;

struct worker_pool *
worker_pool_init(const char *socket_path, indexer_status_callback_t *callback);
void worker_pool_deinit(struct worker_pool **pool);

bool worker_pool_have_busy_connections(struct worker_pool *pool);

bool worker_pool_get_connection(struct worker_pool *pool,
				struct worker_connection **conn_r);
void worker_pool_release_connection(struct worker_pool *pool,
				    struct worker_connection *conn);

struct worker_connection *
worker_pool_find_username_connection(struct worker_pool *pool,
				     const char *username);

#endif