Added .peek for recv_packets
This commit is contained in:
parent
c918bd01b0
commit
79f5d62d47
2 changed files with 6 additions and 1 deletions
|
@ -345,6 +345,12 @@ pure fn peek<T: send, Tb: send>(p: recv_packet_buffered<T, Tb>) -> bool {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl peek<T: send, Tb: send> for recv_packet_buffered<T, Tb> {
|
||||||
|
pure fn peek() -> bool {
|
||||||
|
peek(self)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn sender_terminate<T: send>(p: *packet<T>) {
|
fn sender_terminate<T: send>(p: *packet<T>) {
|
||||||
let p = unsafe { &*p };
|
let p = unsafe { &*p };
|
||||||
alt swap_state_rel(p.header.state, terminated) {
|
alt swap_state_rel(p.header.state, terminated) {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
// Compare bounded and unbounded protocol performance.
|
// Compare bounded and unbounded protocol performance.
|
||||||
|
|
||||||
// xfail-test
|
|
||||||
// xfail-pretty
|
// xfail-pretty
|
||||||
|
|
||||||
use std;
|
use std;
|
||||||
|
|
Loading…
Reference in a new issue