Conversation
tkolleh
marked this pull request as ready for review
March 14, 2026 09:13
tkolleh
added a commit
that referenced
this pull request
Apr 3, 2026
* fix: Use lux for demo script * feat: Make it async * build: add lefthook configuration * docs: simplify readme and add async usage * docs(util): add proper comments to bracket function * docs(init): add proper comments to functions * test: add simple async test * fix: ignore unused err argument in uv.read_start callback * build: add linter to pre-commit hook * Delete spec/simple_spec.lua
This was referenced Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR transitions the
roda.lualibrary from a synchronous, blocking architecture to a fully asynchronous, non-blocking architecture usingluv(libuv bindings for Lua). This ensures that the terminal spinner animates smoothly in the background while child processes execute, without freezing the Lua runtime.Key Changes
system.gettime()checks and blockingwhileloops withuv.new_timer(). The spinner now renders frames automatically in the background event loop.Spinner:execute(command, args)usinguv.spawn. This allows child processes to run concurrently without halting the main Lua thread.stdout) from child processes is now captured asynchronously viauv.read_start(), preventing memory overflow and blocking during long-running commands.async_bracketutility (Continuation-Passing Style) inroda.util. This guarantees safe acquisition and release oflibuvresources (timers, pipes, process handles), preventing memory leaks even if errors occur.roda.run()to expose the libuv event loop, allowing the script to wait for all asynchronous tasks to complete.Benefits
libuv(epoll, kqueue, IOCP).