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

Language tweaks to Fiber [doc] #3995

Merged
merged 1 commit into from
Dec 27, 2020
Merged

Language tweaks to Fiber [doc] #3995

merged 1 commit into from
Dec 27, 2020

Conversation

marcandre
Copy link
Member

Documentation for Fiber.blocking? removed as I can't make sense of it either.
It appears untested.

@zverok
Copy link
Contributor

zverok commented Dec 24, 2020

Thanks 👍
My Ukrainian English leaves much to be desired 🤷

@marcandre
Copy link
Member Author

I wish my "French-Canadian english" was even better 😅

@ioquatix
Copy link
Member

I'm not sure I understand the intention of this PR. Can you explain it?

@ioquatix
Copy link
Member

irb(main):005:0> Fiber.new(blocking: false) {Fiber.blocking?}.resume
=> false
irb(main):006:0> Fiber.new(blocking: true) {Fiber.blocking?}.resume
=> 1

@marcandre
Copy link
Member Author

Odd, I thought I had merged it already.

The PR only rephrases the doc and removed the documentation for Fiber.blocking? until it was clarified... When does it ever return an integer different than 1?

@ioquatix
Copy link
Member

It returns false, or something that is truthy. During the development it was possible to return more than 1 due to blocking mutex, but it was changed. Such a construct may be introduced in the future.

@marcandre
Copy link
Member Author

I tweaked the doc for Fiber.blocking?

@marcandre marcandre merged commit cf1f9bd into ruby:master Dec 27, 2020
@marcandre marcandre deleted the fiber_doc branch December 27, 2020 21:09
@ioquatix
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants