## org.python.modules.thread
Class thread

    java.lang.Object
      org.python.modules.thread.thread

All Implemented Interfaces:
  ClassDictInit

    public class thread

extends Object
implements ClassDictInit

Field Summary
`static PyString` `__doc__`
`static PyObject` `error`

Constructor Summary
`thread()`

Method Summary
`static FunctionThread` `_newFunctionThread(PyObject func, PyTuple args)` Initializes a `FunctionThread`, using the configured stack_size and registering the thread in the @link `group` of threads spawned by the thread module.
`static PyLock` `allocate_lock()`
`static void` `classDictInit(PyObject dict)`
`static void` `exit_thread()`
`static void` `exit()`
`static long` `get_ident()`
`static void` `interruptAllThreads()` Interrupts all running threads spawned by the thread module.
`static long` `stack_size(PyObject[] args)`
`static void` `start_new_thread(PyObject func, PyTuple args)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### __doc__

    public static PyString __doc__

### error

    public static PyObject error

Constructor Detail

### thread

    public thread()

Method Detail

### classDictInit

    public static void classDictInit(PyObject dict)

### start_new_thread

    public static void start_new_thread(PyObject func,
                                        PyTuple args)

### _newFunctionThread

    public static FunctionThread _newFunctionThread(PyObject func,
                                                    PyTuple args)

  Initializes a `FunctionThread`, using the configured stack_size and registering the thread in the @link `group` of threads spawned by the thread module. Also used from the threading.py module.

### interruptAllThreads

    public static void interruptAllThreads()

  Interrupts all running threads spawned by the thread module. This works in conjunction with:
  - `PyTableCode.call(org.python.core.ThreadState, org.python.core.PyFrame, org.python.core.PyObject)`: checks for the interrupted status of the current thread and raise a SystemRestart exception if a interruption is detected.
  - `FunctionThread.run()`: exits the current thread when a SystemRestart exception is not caught.
  Thus, it is possible that this doesn't make all running threads to stop, if SystemRestart exception is caught.

### allocate_lock

    public static PyLock allocate_lock()

### exit

    public static void exit()

### exit_thread

    public static void exit_thread()

### get_ident

    public static long get_ident()

### stack_size

    public static long stack_size(PyObject[] args)

Jython homepage