Skip to content

Commit f1f64ba

Browse files
committed
---
yaml --- r: 60556 b: refs/heads/auto c: fa18a86 h: refs/heads/master v: v3
1 parent 93cdd70 commit f1f64ba

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: d2a1378ed8dd3693511836fdee656d8f79089a73
17+
refs/heads/auto: fa18a861fbd934c295990e59b20c7a0498b88f08
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libcore/rt/message_queue.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use vec::OwnedVector;
1414
use cell::Cell;
1515
use option::*;
1616
use unstable::sync::{Exclusive, exclusive};
17+
use clone::Clone;
1718

1819
pub struct MessageQueue<T> {
1920
// XXX: Another mystery bug fixed by boxing this lock
@@ -41,4 +42,12 @@ impl<T: Owned> MessageQueue<T> {
4142
}
4243
}
4344
}
44-
}
45+
}
46+
47+
impl<T> Clone for MessageQueue<T> {
48+
fn clone(&self) -> MessageQueue<T> {
49+
MessageQueue {
50+
queue: self.queue.clone()
51+
}
52+
}
53+
}

branches/auto/src/libcore/rt/work_queue.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use vec::OwnedVector;
1414
use unstable::sync::{Exclusive, exclusive};
1515
use cell::Cell;
1616
use kinds::Owned;
17+
use clone::Clone;
1718

1819
pub struct WorkQueue<T> {
1920
// XXX: Another mystery bug fixed by boxing this lock
@@ -56,3 +57,11 @@ pub impl<T: Owned> WorkQueue<T> {
5657
self.queue.with_imm(|q| q.is_empty() )
5758
}
5859
}
60+
61+
impl<T> Clone for WorkQueue<T> {
62+
fn clone(&self) -> WorkQueue<T> {
63+
WorkQueue {
64+
queue: self.queue.clone()
65+
}
66+
}
67+
}

0 commit comments

Comments
 (0)