Example: Managing tags


Up: Tools for writing libraries Next: Caching tags on communicator Previous: Comments on sequential sections

Problem: A library contains many objects that need to communicate in ways that are not known until runtime.

Messages between objects are kept separate by using different message tags. How are these tags chosen?


Solution:
Use a private communicator and use an attribute to keep track of available tags in that communicator.



Up: Tools for writing libraries Next: Caching tags on communicator Previous: Comments on sequential sections