> For the complete documentation index, see [llms.txt](https://venndev.gitbook.io/vapm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://venndev.gitbook.io/vapm/thread/how-do-i-create-a-thread.md).

# How do I create a thread?

Unlike Green Thread, this is actually literal threading.

Just like [**`pthreads`**](https://www.php.net/manual/en/book.pthreads.php), the method to create a thread is quite simple.

```php
use vennv\vapm\Thread;

class TestThread extends Thread {

	public function onRun() : void {
		//TODO: your logic
	}
}
```

To run a thread, do the following:

```php
$class = new TestThread();
$class->start();
```
