/** Returns whether the mailbox contains queued communications */
bool empty() const;
+ /* Returns the number of queued communications */
+ unsigned int size() const;
+
/** Check if there is a communication going on in a mailbox. */
bool listen() const;
return pimpl_->comm_queue_.empty();
}
+unsigned int Mailbox::size() const
+{
+ return pimpl_->comm_queue_.size();
+}
+
bool Mailbox::listen() const
{
return not this->empty() || (pimpl_->permanent_receiver_ && not pimpl_->done_comm_queue_.empty());