Skip to content

jiwonz/luau-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

luau-task

Get the task library for Roblox or Lune or Luau. Inspired by seaofvoices/luau-task.

Installation

via pesde

pesde add jiwonz/task

Example Usage

-- It works almost identically in cross-environment.
local task = require("./path/to/task")

local function main() -- We need a separate thread from a main thread in luau.
	local s = task.wait(1) -- Since we cannot yield a main thread in luau.
	print(`{s} seconds has passed`)
end

if task.start then -- 'task.start' is only available in luau. Starts a new thread(optional) and scheduler.
	task.start(main)
else
	main()
end

TO-DOs

  • Make docs based on moonwave docs comments (It'll be published to actual 0.2.0)

Credits

About

Get the task library for Roblox or Lune or Luau

Topics

Resources

License

Stars

3 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages