
Async is a composable asynchronous I/O framework for Ruby based on io-event.
"Lately I've been looking into
async, as one of my projects – tus-ruby-server – would really benefit from non-blocking I/O. It's really beautifully designed." – janko
Please see the project documentation for more details.
Getting Started - This guide shows how to add async to your project and run code asynchronously.
Scheduler - This guide gives an overview of how the scheduler is implemented.
Tasks - This guide explains how asynchronous tasks work and how to use them.
Best Practices - This guide gives an overview of best practices for using Async.
Debugging - This guide explains how to debug issues with programs that use Async.
Thread safety - This guide explains thread safety in Ruby, focusing on fibers and threads, common pitfalls, and best practices to avoid problems like data corruption, race conditions, and deadlocks.
Please see the project releases for all releases.
Process::WNOHANG waits still return nil.Sync and Async can now be invoked from a non-blocking fiber that has no scheduler (e.g. inside an Enumerator or a bare Fiber.new). Previously this raised RuntimeError: Running scheduler on non-blocking fiber!. The reactor is now run within Fiber.blocking, so the scheduler always runs on a blocking fiber.Async::Condition#waiting_count. This allows you to see how many tasks are currently waiting on the condition, which can be useful for debugging and monitoring purposes.Async::Barrier#wait now returns the number of tasks that were waited for, or nil if there were no tasks to wait for. This provides better feedback about the operation, and allows you to know how many tasks were involved in the wait.Barrier#async when parent.async yields before the child block executes. Previously, Barrier#wait could return early and miss tracking the task entirely, because the task had not yet appended itself to the barrier's task list.Task#stop to Task#cancel for better clarity and consistency with common concurrency terminology. The old stop method is still available as an alias for backward compatibility, but it is recommended to use cancel going forward.Task#wait -> Promise#wait, so task.wait(timeout: N) is supported.Async::Loop for robust, time-aligned loops.Async::Promise#wait(timeout: N).async-http.We welcome contributions to this project.
git checkout -b my-new-feature).git commit -am 'Add some feature').git push origin my-new-feature).To run the test suite:
bundle exec sus
To make a new release:
bundle exec bake gem:release:patch # or minor or major
In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
(top 30 of 36)
Ruby
100.0%

Async is a composable asynchronous I/O framework for Ruby based on io-event.
"Lately I've been looking into
async, as one of my projects – tus-ruby-server – would really benefit from non-blocking I/O. It's really beautifully designed." – janko
Please see the project documentation for more details.
Getting Started - This guide shows how to add async to your project and run code asynchronously.
Scheduler - This guide gives an overview of how the scheduler is implemented.
Tasks - This guide explains how asynchronous tasks work and how to use them.
Best Practices - This guide gives an overview of best practices for using Async.
Debugging - This guide explains how to debug issues with programs that use Async.
Thread safety - This guide explains thread safety in Ruby, focusing on fibers and threads, common pitfalls, and best practices to avoid problems like data corruption, race conditions, and deadlocks.
Please see the project releases for all releases.
Process::WNOHANG waits still return nil.Sync and Async can now be invoked from a non-blocking fiber that has no scheduler (e.g. inside an Enumerator or a bare Fiber.new). Previously this raised RuntimeError: Running scheduler on non-blocking fiber!. The reactor is now run within Fiber.blocking, so the scheduler always runs on a blocking fiber.Async::Condition#waiting_count. This allows you to see how many tasks are currently waiting on the condition, which can be useful for debugging and monitoring purposes.Async::Barrier#wait now returns the number of tasks that were waited for, or nil if there were no tasks to wait for. This provides better feedback about the operation, and allows you to know how many tasks were involved in the wait.Barrier#async when parent.async yields before the child block executes. Previously, Barrier#wait could return early and miss tracking the task entirely, because the task had not yet appended itself to the barrier's task list.Task#stop to Task#cancel for better clarity and consistency with common concurrency terminology. The old stop method is still available as an alias for backward compatibility, but it is recommended to use cancel going forward.Task#wait -> Promise#wait, so task.wait(timeout: N) is supported.Async::Loop for robust, time-aligned loops.Async::Promise#wait(timeout: N).async-http.We welcome contributions to this project.
git checkout -b my-new-feature).git commit -am 'Add some feature').git push origin my-new-feature).To run the test suite:
bundle exec sus
To make a new release:
bundle exec bake gem:release:patch # or minor or major
In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
(top 30 of 36)
Ruby
100.0%