m4us.core.postoffices

Provides various kinds of post office classes for message routing.

Post offices are responsible for receiving posted messages from coroutines and routing them to message queues of other coroutines based on the links that have been registered.

Inheritance Diagram

Inheritance diagram of m4us.core.postoffices

Members

class PostOffice(link_ignores_duplicates=False, unlink_ignores_missing=False)[source]

Bases: object

The standard post office class used for message routing.

This is a simple and reasonably efficient implementation of IPostOffice. Unless you have a special need, this is this post office you want to use.

Implements :m4us.core.interfaces.IPostOffice
Provides :m4us.core.interfaces.IPostOfficeFactory
post(source, outbox, message)[source]

Post a message from the source outbox.

See also

The IPostOffice interface for details about this method.

register(first_link, *other_links)[source]

Register links between coroutines.

See also

The IPostOffice interface for details about this method.

retrieve(sink)[source]

Retrieve all outstanding messages for a sink coroutine.

See also

The IPostOffice interface for details about this method.

unregister(first_link, *other_links)[source]

Unregister previously registered links.

See also

The IPostOffice interface for details about this method.

Table Of Contents

Previous topic

m4us.core.messages

Next topic

m4us.core.schedulers

This Page