Skip to content

Conversation

@jeremyevans
Copy link
Contributor

This was the historical Ruby 1.8 behavior.

This uses @nobu's patch from #2884, but restores backwards compatibility for Mutex#sleep to always return the slept time. It adds Mutex#sleep_for that requires a timeout argument and will return nil if the sleep times out.

@jeremyevans jeremyevans requested a review from nobu March 10, 2021 19:36
@nobu
Copy link
Member

nobu commented Mar 11, 2021

@jeremyevans jeremyevans force-pushed the conditionvariable-wait-false-16608 branch from b129165 to 81d0f96 Compare March 17, 2021 23:46
@jeremyevans
Copy link
Contributor Author

At the dev meeting, matz approved modifying Mutex#sleep, so I'm removing the second patch. Will merge if CI passes.

@ioquatix
Copy link
Member

LGTM thanks for making the interface more communicative.

@jeremyevans jeremyevans force-pushed the conditionvariable-wait-false-16608 branch from 81d0f96 to ac09a63 Compare June 16, 2021 15:46
@jeremyevans jeremyevans force-pushed the conditionvariable-wait-false-16608 branch from ac09a63 to 2f5e851 Compare July 25, 2021 19:22
@jeremyevans jeremyevans merged commit 070557a into ruby:master Jul 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants