# Class: glfwthread

--- DISABLED --- GLFW Documentation: A thread is a separate execution path within a process. All threads within a process share the same address space and resources. Threads execute in parallel, either virtually by means of time-sharing on a single processor, or truly in parallel on several processors. Even on a multi-processor system, time-sharing is employed in order to maximize processor utilization and to ensure fair scheduling. GLFW provides an operating system independent interface to thread management.

## Hierarchy

    o-+ thread
      o-+ glfwthread

## Interfaces:

- hashid

## Methods:

### Method overview:

- delete
- id
- killall
- sleep
- wait

delete (glfwthread)
  returns: ()
  Threadsafe
  Destroys the thread and stops its execution. This function is a very dangerous operation, which may interrupt a thread in the middle of an important operation, and its use is discouraged. You should always try to end a thread in a graceful way using thread communication, and use glfwWaitThread in order to wait for the thread to die.
id ()
  returns: ([glfwthread])
  Threadsafe
  returns thread of currently running thread or nothing if it is the mainloop.
killall ()
  returns: ()
  Threadsafe
  Kills all threads except the calling one. Calling this function is making luxinia unstable and it is suggested not to use it. However, any thread that has not terminated when luxinia shuts down will be killed, so be adviced to shut down your threads properly.
sleep (float seconds)
  returns: ()
  Threadsafe
  freezes the current thread for some time, leaving the CPU to the other threads
wait (glfwthread waitfor, boolean wait)
  returns: (boolean)
  Threadsafe
  returns immediatly if wait is false and returns false if the given thread still exists and is running. Otherwise it will wait for the thread to be terminated.

## Inherited Methods: