From bd162a9bd6ce3ece3ee0cbe363c43dffcdb12152 Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Mon, 23 Jan 2023 19:14:41 -0500 Subject: [PATCH] Add task lib to readme --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 1bf3cb5..7a5d12a 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,21 @@ type process = { +
+task - Task scheduler & thread spawning + +```lua +type task = { + cancel: (thread: thread) -> (), + defer: (functionOrThread: thread | (...any) -> (...any)) -> thread, + delay: (duration: number?, functionOrThread: thread | (...any) -> (...any)) -> thread, + spawn: (functionOrThread: thread | (...any) -> (...any)) -> thread, + wait: (duration: number?) -> (number), +} +``` + +
+