An open API service indexing awesome lists of open source software.

https://github.com/yetanotherclown/threadpool

A library for creating Thread Pools to improve performance and reduce latency on Roblox.
https://github.com/yetanotherclown/threadpool

luau roblox roblox-library roblox-lua

Last synced: 3 months ago
JSON representation

A library for creating Thread Pools to improve performance and reduce latency on Roblox.

Awesome Lists containing this project

README

          

# ThreadPool

View docs

A library for creating Thread Pools to improve performance and reduce latency.

---

#### Thread Pooling
Thread Pooling reuses already existing threads instead of creating new threads every time you need to use one.

#### Why use this?
You shouldn't need to, unless you are creating multiple threads at a given time.

#### Usage
```lua
local ThreadPool = Require(ReplicatedStorage.Packages.ThreadPool)

local myThreadPool = ThreadPool.new()

myThreadPool:spawn(function(...)
print(...) -- Prints "Hello World"
end, "Hello, world!")
```

---

#### Installing

Within your ``wally.toml`` file:
```toml
[dependences]
ThreadPool = "yetanotherclown/threadpool@1.0.0"
```

#### Building with Rojo

To build yourself, use:
```bash
rojo build -o "ThreadPool.rbxm"
```

For more help, check out [the Rojo documentation](https://rojo.space/docs).