Skip to content

Commit

Permalink
[ipc] E: Mailbox Cut Off
Browse files Browse the repository at this point in the history
  • Loading branch information
ppenna committed Sep 5, 2024
1 parent 9962f1b commit 8f5ceae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ipc/mbx/mailbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ pub struct Mailbox {
buffer: LinkedList<Message>,
}

const CUT_OFF: usize = 64;

//==================================================================================================
// Implementations
//==================================================================================================

impl Mailbox {
pub fn send(&mut self, message: Message) {
if self.buffer.len() >= CUT_OFF {
panic!("Mailbox is full");
}
self.buffer.push_back(message);
}

Expand Down

0 comments on commit 8f5ceae

Please sign in to comment.