Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout.timeout with nil value #114

Closed
floriandejonckheere opened this issue Jul 27, 2023 · 0 comments
Closed

Timeout.timeout with nil value #114

floriandejonckheere opened this issue Jul 27, 2023 · 0 comments

Comments

@floriandejonckheere
Copy link
Contributor

According to Ruby documentation, calling Timeout.timeout with a nil or zero value will execute the block without any timeout. However, Polyphony does not support this:

irb(main):001:0> Timeout.timeout(nil) { puts "foo" }
/usr/local/bundle/gems/polyphony-1.4/lib/polyphony/extensions/object.rb:64:in `backend_timeout': no implicit conversion to float from nil (TypeError)

      Polyphony.backend_timeout(interval, with_exception, &block)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	from /usr/local/bundle/gems/polyphony-1.4/lib/polyphony/extensions/object.rb:64:in `cancel_after'
	from /usr/local/bundle/gems/polyphony-1.4/lib/polyphony/extensions/timeout.rb:17:in `timeout'
	from (irb):1:in `<main>'
	from bin/console:13:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant