Function Create-Thread

Part of:

package glfw
( create-thread < fun > < arg > )
Parameters
fun
A pointer to a function that acts as the entry point for the new thread. The function should have
the following C language prototype:
void GLFWCALL functionname( void *arg );
Where functionname is the name of the thread function, and arg is the user supplied argument
(see below).
arg
An arbitrary argument for the thread. arg will be passed as the argument to the thread function
pointed to by fun. For instance, arg can point to data that is to be processed by the thread.
Return values
The function returns a thread identification number if the thread was created successfully. This number
is always positive. If the function fails, a negative number is returned.
Description
The function creates a new thread, which executes within the same address space as the calling process.
The thread entry point is specified with the fun argument.
Once the thread function fun returns, the thread dies.
Notes
Even if the function returns a positive thread ID, indicating that the thread was created successfully, the
thread may be unable to execute, for instance if the thread start address is not a valid thread entry point.