async
async copied to clipboard
An awesome asynchronous event-driven reactor for Ruby.
In some RSpec tests, I expect an async task to timeout and raise Async::TimeoutError. It works, but the task exception prints to the terminal, which I would rather avoid in...
We're looking to use https://github.com/guard/rb-inotify as a wrapped class that will monitor a path on the filesystem and also invoke other work. We're seeing the monitor get blocked on startup...
This is an experimental PR to see how badly Windows fails. ## Types of Changes - New feature. ## Testing - [ ] I added tests for my changes. -...
Ruby version: `3.1.2` async: `2.1.0` async-http: `0.59.2` OS: macOS Monterey Getting the following error and stack trace when making any HTTP calls. The example below is when running [this example](https://github.com/socketry/async-http#post-json-data)...
Hi, My understanding of using transient:true is that any child task will be terminated as soon as the parent task ends. But I don't understand this: ```ruby require 'async' Async(transient:...
``` #!/usr/bin/env ruby require 'async' require 'async/queue' @input_channel = Async::LimitedQueue.new(100) def consumer Async do |task| loop do task.with_timeout(0.001) do @input_channel.dequeue rescue Async::TimeoutError # no-op end end end end task =...
```ruby #!/usr/bin/env ruby require_relative 'lib/async' require_relative 'lib/async/queue' Async do queue = Async::Queue.new 10.times do |i| Async(finished: queue) do # raise "Boom" if rand > 0.5 sleep(i) end end queue.each do...
Compare memory usage of threads vs fibers. cc @MatheusRich ## Contribution - [x] I added tests for my changes. - [x] I tested my changes locally. - [x] I agree...
This is an alternative to the proposal in . It requires the following: ```ruby Schedule {} # (1) Error, No parent async task set! Sync do Schedule {...} # (2)...