Go to the source code of this file.
◆ VL_THREAD_LOCAL
#define VL_THREAD_LOCAL _Thread_local |
◆ VL_THREAD_NULL
◆ vl_thread
◆ vl_thread_proc
typedef void(* vl_thread_proc) (void *usr) |
◆ vlThreadCurrent()
Gets the current thread.
- Returns
- vl_thread representing the current thread.
◆ vlThreadDelete()
Deletes the specified thread.
- Warning
- This will result in undefined behavior if the thread has not been joined prior to calling this function.
- See also
- vlThreadJoin
-
vlThreadJoinTimeout
- Parameters
-
thread | which thread to delete |
◆ vlThreadExit()
Exits the calling thread.
- Note
- Does not return to the caller.
◆ vlThreadJoin()
Joins the specified thread, halting the calling thread until the specified thread exits.
- Note
- If the specified thread happens to be the main thread, this will return false.
- Parameters
-
- Returns
- true on success, false on error.
◆ vlThreadJoinTimeout()
Attempts to join the specified thread until a maximum amount of time has passed.
- Note
- Will always return false is trying to join the main thread.
- Parameters
-
- Returns
- true on success, false on timeout or error.
◆ vlThreadNew()
Creates and begins executing a new thread.
- Note
- May return VL_THREAD_NULL on failure.
- Parameters
-
- Returns
- thread handle
◆ vlThreadSleep()
Sleeps the current thread a specified total number of milliseconds.
- Parameters
-
◆ vlThreadYield()
Yields the execution of the current thread, allowing another thread to take the remainder of its timeslice.
- Returns
- a boolean indicating if the yield operation occurred. May return false if there is no other thread to yield to.