public Thread(runnable as Runnable):
Creates a thread that executes the supplied runnable.
The thread receives an auto-generated name derived from its unique id. A null runnable creates a thread whose run() method performs no work.
| Parameter | Description |
|---|---|
runnable | Work executed when the thread starts. |
worker = Thread(task) worker.start() worker.join()