You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @ioquatix, thanks for this neat project! I was trying out the new scheduler with this example and ran into a few errors.
require"async"require"net/http"reactor=Async::Reactor.newstart=Time.nowThread.newdoFiber.set_scheduler(reactor.scheduler)%w[2.62.73.0].eachdo |version|
Fiber.scheduledot=Time.nowNet::HTTP.get('rubyreferences.github.io',"/rubychanges/#{version}.html")puts'%s: finished in %.3f' % [version,Time.now - t]endendend.join
Stack trace
/Users/user/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/async-1.28.2/lib/async/task.rb:75:in `initialize': wrong number of arguments (given 0, expected 1..2) (ArgumentError)
from /Users/user/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/async-1.28.2/lib/async/scheduler.rb:105:in `new'
from /Users/user/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/async-1.28.2/lib/async/scheduler.rb:105:in `fiber'
from go.rb:14:in `schedule'
from go.rb:14:in `block (2 levels) in <main>'
from go.rb:13:in `each'
from go.rb:13:in `block in <main>'
It looks like @reactor needs to be passed to Task.new. After adding that, ran into undefined method 'resume' for #<Async::Task>.
The text was updated successfully, but these errors were encountered:
Hey @ioquatix, thanks for this neat project! I was trying out the new scheduler with this example and ran into a few errors.
Stack trace
It looks like
@reactor
needs to be passed toTask.new
. After adding that, ran intoundefined method 'resume' for #<Async::Task>
.The text was updated successfully, but these errors were encountered: