Class: Actor::Mailbox::Filter

Mailbox filterset. Takes patterns or procs to match messages with and returns the associated proc when a pattern matches.

Public Class Methods


Public Instance Methods


after (seconds, &action)

Provide a timeout (in seconds, can be a Float) to wait for matching messages. If the timeout elapses, the given block is called.


empty? ()

Is the filterset empty?


match (message)

Match a message using the filter


when (pattern, &action)

Provide a pattern to match against with === and a block to call when the pattern is matched.