Groonga
Loading...
Searching...
No Matches
thread.h
Go to the documentation of this file.
1/*
2 Copyright(C) 2015-2016 Brazil
3 Copyright(C) 2018-2021 Sutou Kouhei <kou@clear-code.com>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18*/
19
20#pragma once
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
34GRN_API uint32_t
44GRN_API void
45grn_thread_set_limit(uint32_t new_limit);
46
47GRN_API uint32_t
49GRN_API void
50grn_thread_set_limit_with_ctx(grn_ctx *ctx, uint32_t new_limit);
51
65typedef uint32_t (*grn_thread_get_limit_func)(void *data);
94GRN_API void
108typedef void (*grn_thread_set_limit_func)(uint32_t new_limit, void *data);
148GRN_API void
150
152 void *data);
153GRN_API void
155 void *data);
157 uint32_t new_limit,
158 void *data);
159GRN_API void
161 void *data);
162
165
166#ifdef __cplusplus
167}
168#endif
grn_rc
Definition groonga.h:61
#define GRN_API
Definition groonga.h:39
Definition groonga.h:351
GRN_API void grn_thread_set_get_limit_with_ctx_func(grn_thread_get_limit_with_ctx_func func, void *data)
void(* grn_thread_set_limit_with_ctx_func)(grn_ctx *ctx, uint32_t new_limit, void *data)
Definition thread.h:156
void(* grn_thread_set_limit_func)(uint32_t new_limit, void *data)
The function pointer type that sets the max number of threads.
Definition thread.h:108
GRN_API void grn_thread_set_limit(uint32_t new_limit)
Set the max number of threads.
GRN_API grn_rc grn_thread_dump(grn_ctx *ctx)
GRN_API uint32_t grn_thread_get_limit(void)
Get the max number of threads.
uint32_t(* grn_thread_get_limit_func)(void *data)
The function pointer type that returns the max number of threads.
Definition thread.h:65
uint32_t(* grn_thread_get_limit_with_ctx_func)(grn_ctx *ctx, void *data)
Definition thread.h:151
GRN_API void grn_thread_set_set_limit_func(grn_thread_set_limit_func func, void *data)
Set the custom function that sets the max number of threads.
GRN_API void grn_thread_set_set_limit_with_ctx_func(grn_thread_set_limit_with_ctx_func func, void *data)
GRN_API void grn_thread_set_limit_with_ctx(grn_ctx *ctx, uint32_t new_limit)
GRN_API uint32_t grn_thread_get_limit_with_ctx(grn_ctx *ctx)
GRN_API void grn_thread_set_get_limit_func(grn_thread_get_limit_func func, void *data)
Set the custom function that returns the max number of threads.