]> git.lizzy.rs Git - rust.git/commit
Make Condvar::wait_timeout return an enum instead of a bool
authorSteven Fackler <sfackler@gmail.com>
Fri, 14 Aug 2015 04:58:20 +0000 (21:58 -0700)
committerSteven Fackler <sfackler@gmail.com>
Thu, 20 Aug 2015 00:00:15 +0000 (17:00 -0700)
commit42a386fcf89a40e6c3a8806ccf381514c2a77c10
treee77742b5cb6447176ebb66c91fdb4981c0cc6336
parentaca2057ed5fb7af3f8905b2bc01f72fa001c35c8
Make Condvar::wait_timeout return an enum instead of a bool

Returning a primitive bool results in a somewhat confusing API - does
`true` indicate success - i.e. no timeout, or that a timeout has
occurred? An explicitly named enum makes it clearer.

[breaking-change]
src/libstd/sync/condvar.rs
src/libstd/sync/mod.rs