Skip to content

Commit 6e8b4a6

Browse files
committed
---
yaml --- r: 20963 b: refs/heads/snap-stage3 c: c5fbff0 h: refs/heads/master i: 20961: e865bc1 20959: 2b74fd1 v: v3
1 parent 93d81bf commit 6e8b4a6

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
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: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: bc6ba6b09174fdd1feaee1ce011572ba6eb1986a
4+
refs/heads/snap-stage3: c5fbff01ce2b3e2d3020182891d4a22b8958f7f3
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcore/pipes.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,20 @@ fn try_recv<T: send, Tbuffer: send>(-p: recv_packet_buffered<T, Tbuffer>)
395395
{
396396
let p_ = p.unwrap();
397397
let p = unsafe { &*p_ };
398+
399+
// optimistic path
400+
match p.header.state {
401+
full => {
402+
let mut payload = none;
403+
payload <-> p.payload;
404+
p.header.state = empty;
405+
return some(option::unwrap(payload))
406+
},
407+
terminated => return none,
408+
_ => {}
409+
}
410+
411+
// regular path
398412
let this = rustrt::rust_get_task();
399413
rustrt::task_clear_event_reject(this);
400414
rustrt::rust_task_ref(this);

0 commit comments

Comments
 (0)