C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::mail_cache Class Reference

A simple cache for storing mailbox elements for an actor for later reuse. More...

#include <mail_cache.hpp>

Public Member Functions

 mail_cache (local_actor *self, size_t max_size)
 
size_t max_size () const noexcept
 Returns the maximum number of elements this cache can store.
 
size_t size () const noexcept
 Returns the current number of elements in the cache.
 
bool empty () const noexcept
 Checks whether the cache is empty.
 
bool full () const noexcept
 Checks whether the cache reached its maximum size.
 
void stash (message msg)
 Adds msg to the cache.
 
void unstash ()
 Removes all elements from the cache and returns them to the mailbox.
 

Detailed Description

A simple cache for storing mailbox elements for an actor for later reuse.

Examples
dining_philosophers.cpp.

The documentation for this class was generated from the following files: