Sends a message over the message queue with a timeout.
impl MsgQueue {
fn send_timeout(&self, msg: &[u8], priority: u16, timeout: Time) -> Result<(), Errno>
}| Name | Description |
|---|---|
| msg | The message to be sent. |
| priority | The priority of the message. |
| timeout | Until when this function should block. |
The priority should be between 0 and i16::max(). The timeout argument is absolute. See the example.
let flags = FILE_READ_WRITE | FILE_CREATE;
let queue = MsgQueue::open("test", flags, MODE_FILE, None).unwrap();
let timeout = REAL.get_time().unwrap() + Time::seconds(1);
queue.send_timeout("hello, world".as_ref(), 1, timeout));