public Thread(runnable as Runnable, name as String):
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.
| Parameter | Description |
|---|---|
runnable | Work executed when the thread starts. |
name | Human-readable thread name. |
worker = Thread(task, "index-worker") worker.start() worker.join()