Groonga
Loading...
Searching...
No Matches
request_timer.h
Go to the documentation of this file.
1/*
2 Copyright(C) 2016 Brazil
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17*/
18
19#pragma once
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25typedef struct _grn_request_timer {
26 void *user_data;
27 void *(*register_func)(const char *request_id,
28 unsigned int request_id_size,
29 double timeout,
30 void *user_data);
31 void (*unregister_func)(void *timer_id,
32 void *user_data);
33 void (*fin_func)(void *user_data);
35
36/* Multithreading unsafe. */
38
39/* Multithreading safety is depends on grn_request_timer. */
40GRN_API void *grn_request_timer_register(const char *request_id,
41 unsigned int request_id_size,
42 double timeout);
43/* Multithreading safety is depends on grn_request_timer. */
45
46
49
50
51#ifdef __cplusplus
52}
53#endif
#define GRN_API
Definition groonga.h:39
GRN_API void grn_set_default_request_timeout(double timeout)
GRN_API void * grn_request_timer_register(const char *request_id, unsigned int request_id_size, double timeout)
struct _grn_request_timer grn_request_timer
GRN_API void grn_request_timer_set(grn_request_timer *timer)
GRN_API void grn_request_timer_unregister(void *timer_id)
GRN_API double grn_get_default_request_timeout(void)
Definition request_timer.h:25
void(* unregister_func)(void *timer_id, void *user_data)
Definition request_timer.h:31
void * user_data
Definition request_timer.h:26
void(* fin_func)(void *user_data)
Definition request_timer.h:33