diff options
| author | bors <bors@rust-lang.org> | 2013-06-01 09:37:39 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-06-01 09:37:39 -0700 |
| commit | 44af5064d0ac3d45223f1555b299f10fd4902f5c (patch) | |
| tree | 33a4db59bd936a73594ca144e809b6074d6ccef3 /src/libstd/rt/work_queue.rs | |
| parent | b8391ccea0b2e2718a4d4ef999e9f03583c7ddea (diff) | |
| parent | 5fb254695b4db9af3d8e33577fae28ae9f7006c5 (diff) | |
| download | rust-44af5064d0ac3d45223f1555b299f10fd4902f5c.tar.gz rust-44af5064d0ac3d45223f1555b299f10fd4902f5c.zip | |
auto merge of #6871 : pcwalton/rust/de-pub-impl, r=pcwalton
Diffstat (limited to 'src/libstd/rt/work_queue.rs')
| -rw-r--r-- | src/libstd/rt/work_queue.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/rt/work_queue.rs b/src/libstd/rt/work_queue.rs index 4671a45aaea..58d36113f0e 100644 --- a/src/libstd/rt/work_queue.rs +++ b/src/libstd/rt/work_queue.rs @@ -21,21 +21,21 @@ pub struct WorkQueue<T> { priv queue: ~Exclusive<~[T]> } -pub impl<T: Owned> WorkQueue<T> { - fn new() -> WorkQueue<T> { +impl<T: Owned> WorkQueue<T> { + pub fn new() -> WorkQueue<T> { WorkQueue { queue: ~exclusive(~[]) } } - fn push(&mut self, value: T) { + pub fn push(&mut self, value: T) { unsafe { let value = Cell(value); self.queue.with(|q| q.unshift(value.take()) ); } } - fn pop(&mut self) -> Option<T> { + pub fn pop(&mut self) -> Option<T> { unsafe { do self.queue.with |q| { if !q.is_empty() { @@ -47,7 +47,7 @@ pub impl<T: Owned> WorkQueue<T> { } } - fn steal(&mut self) -> Option<T> { + pub fn steal(&mut self) -> Option<T> { unsafe { do self.queue.with |q| { if !q.is_empty() { @@ -59,7 +59,7 @@ pub impl<T: Owned> WorkQueue<T> { } } - fn is_empty(&self) -> bool { + pub fn is_empty(&self) -> bool { unsafe { self.queue.with_imm(|q| q.is_empty() ) } |
