diff options
| author | bors <bors@rust-lang.org> | 2013-08-18 15:02:04 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-08-18 15:02:04 -0700 |
| commit | b26e11db862a9f06556d2871b1b71e09f652e395 (patch) | |
| tree | f2515c8e289133c917b0dfd1d0d2f5e4ba7e3281 /src/libstd/rt | |
| parent | e185b049af214cc7900beaae557a12863f4b3ce3 (diff) | |
| parent | 418e1ebae6ed543b1a78c3e987d42bf0bf25f310 (diff) | |
| download | rust-b26e11db862a9f06556d2871b1b71e09f652e395.tar.gz rust-b26e11db862a9f06556d2871b1b71e09f652e395.zip | |
auto merge of #8560 : kballard/rust/reserve-yield, r=pcwalton
Rename task::yield() to task::deschedule(). Fixes #8494.
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/kill.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/rt/kill.rs b/src/libstd/rt/kill.rs index 83bf34941dc..1608d8cbc2c 100644 --- a/src/libstd/rt/kill.rs +++ b/src/libstd/rt/kill.rs @@ -141,7 +141,7 @@ pub struct Death { on_exit: Option<~fn(bool)>, // nesting level counter for task::unkillable calls (0 == killable). unkillable: int, - // nesting level counter for unstable::atomically calls (0 == can yield). + // nesting level counter for unstable::atomically calls (0 == can deschedule). wont_sleep: int, // A "spare" handle to the kill flag inside the kill handle. Used during // blocking/waking as an optimization to avoid two xadds on the refcount. @@ -572,16 +572,16 @@ impl Death { } /// Enter a possibly-nested "atomic" section of code. Just for assertions. - /// All calls must be paired with a subsequent call to allow_yield. + /// All calls must be paired with a subsequent call to allow_deschedule. #[inline] - pub fn inhibit_yield(&mut self) { + pub fn inhibit_deschedule(&mut self) { self.wont_sleep += 1; } /// Exit a possibly-nested "atomic" section of code. Just for assertions. - /// All calls must be paired with a preceding call to inhibit_yield. + /// All calls must be paired with a preceding call to inhibit_deschedule. #[inline] - pub fn allow_yield(&mut self) { + pub fn allow_deschedule(&mut self) { rtassert!(self.wont_sleep != 0); self.wont_sleep -= 1; } |
