pub type Worker(value) { Worker(value) }
Worker(value)
pub fn close(worker: Worker(a)) -> Nil
Close the worker and release its resources
pub fn create(handler: fn(a) -> b) -> Promise(Worker(b))
Create a new worker
pub fn send(worker: Worker(a), message: a) -> Promise(a)
Send a message to the worker