Kore 3
Loading...
Searching...
No Matches
thread.h
Go to the documentation of this file.
1#ifndef KORE_THREADS_THREAD_HEADER
2#define KORE_THREADS_THREAD_HEADER
3
4#include <kore3/global.h>
5
6#include <kore3/backend/thread.h>
7
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16typedef struct kore_thread {
17 kore_thread_impl impl;
19
26KORE_FUNC void kore_thread_init(kore_thread *thread, void (*func)(void *param), void *param);
27
33
40
45KORE_FUNC void kore_thread_set_name(const char *name);
46
51KORE_FUNC void kore_thread_sleep(int milliseconds);
52
53#ifdef __cplusplus
54}
55#endif
56
57#endif
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
Definition thread.h:16
KORE_FUNC void kore_thread_init(kore_thread *thread, void(*func)(void *param), void *param)
Starts a thread via the provided function.
KORE_FUNC void kore_thread_wait_and_destroy(kore_thread *thread)
Waits for the thread to complete execution and then destroys it.
KORE_FUNC bool kore_thread_try_to_destroy(kore_thread *thread)
Attempts to destroy a thread.
KORE_FUNC void kore_thread_sleep(int milliseconds)
Puts the current thread to sleep.
KORE_FUNC void kore_thread_set_name(const char *name)
Assigns a name to the current thread which will then show up in debuggers and profilers.