34 #ifndef GRPC_SUPPORT_THD_H
35 #define GRPC_SUPPORT_THD_H
GPRAPI gpr_thd_options gpr_thd_options_default(void)
Return a gpr_thd_options struct with all fields set to defaults.
GPRAPI int gpr_thd_new(gpr_thd_id *t, void(*thd_body)(void *arg), void *arg, const gpr_thd_options *options)
Create a new thread running (*thd_body)(arg) and place its thread identifier in *t, and return true.
int flags
Definition: thd.h:55
GPRAPI void gpr_thd_options_set_detached(gpr_thd_options *options)
Set the thread to become detached on startup - this is the default.
GPRAPI gpr_thd_id gpr_thd_currentid(void)
Returns the identifier of the current thread.
uintptr_t gpr_thd_id
Thread interface for GPR.
Definition: thd.h:51
GPRAPI void gpr_thd_options_set_joinable(gpr_thd_options *options)
Set the thread to become joinable - mutually exclusive with detached.
GPRAPI void gpr_thd_join(gpr_thd_id t)
Blocks until the specified thread properly terminates.
GPRAPI int gpr_thd_options_is_detached(const gpr_thd_options *options)
Returns non-zero if the option detached is set.
Thread creation options.
Definition: thd.h:54
GPRAPI int gpr_thd_options_is_joinable(const gpr_thd_options *options)
Returns non-zero if the option joinable is set.