Add a selectable implementation for *packet_header
This commit is contained in:
parent
184da12896
commit
8d1922d4c8
1 changed files with 4 additions and 0 deletions
|
|
@ -624,6 +624,10 @@ trait selectable {
|
|||
pure fn header() -> *packet_header;
|
||||
}
|
||||
|
||||
impl of selectable for *packet_header {
|
||||
pure fn header() -> *packet_header { self }
|
||||
}
|
||||
|
||||
/// Returns the index of an endpoint that is ready to receive.
|
||||
fn selecti<T: selectable>(endpoints: &[T]) -> uint {
|
||||
wait_many(endpoints.map(|p| p.header()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue