Skip to content

Commit df0746e

Browse files
committed
---
yaml --- r: 232560 b: refs/heads/try c: 46156de h: refs/heads/master v: v3
1 parent 007f378 commit df0746e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 42a386fcf89a40e6c3a8806ccf381514c2a77c10
4+
refs/heads/try: 46156de5f1d8a4ebfb874d170ba6844462b5781b
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/libstd/sync/condvar.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use time::Duration;
2020

2121
/// A type indicating whether a timed wait on a condition variable returned
2222
/// due to a time out or not.
23-
#[derive(Debug, PartialEq, Eq)]
23+
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
2424
#[unstable(feature = "wait_timeout", reason = "newly added")]
2525
pub enum TimedOut {
2626
/// The wait timed out.
@@ -29,6 +29,13 @@ pub enum TimedOut {
2929
No
3030
}
3131

32+
impl TimedOut {
33+
/// Returns `true` iff the value of `self` is `Yes`.
34+
pub fn timed_out(&self) -> bool {
35+
*self == TimedOut::Yes
36+
}
37+
}
38+
3239
/// A Condition Variable
3340
///
3441
/// Condition variables represent the ability to block a thread such that it

0 commit comments

Comments
 (0)