klyn.threading.Thread.Thread
constructor

    public Thread(runnable as Runnable, name as String):

Description

Creates a named thread that executes the supplied runnable.

An empty or null name is normalized to `"thread"`. A null runnable creates a thread whose `run()` method performs no work.

Parameters

Parameter | Description
--- | ---
`runnable` | Work executed when the thread starts.
`name` | Human-readable thread name.

Example

worker = Thread(task, "index-worker") worker.start() worker.join()