libpoet is a C++ parallel programing library. It provides support for easily creating active objects, creating monitor objects, and automatically validating mutex locking order.
Active objects provide concurrency and thread-safety, since each active object
executes in its own thread. Futures are employed to communicate with active objects
in a thread-safe manner. To learn
more about the active object concept, see the paper
"Active Object, An Object Behavioral Pattern for Concurrent Programming."
by R. Greg Lavender and Douglas C. Schmidt.
Some of the more important active object classes in libpoet
are poet::active_function, poet::future,
and poet::scheduler.
Monitor objects provide thread-safety via automatically locked access to an object.
See the paper
"Monitor Object, An Object Behavioral Pattern for Concurrent Programming"
by Douglas C. Schmidt for more information about monitor objects.
The poet::monitor_ptr, poet::monitor,
and poet::monitor_base classes in libpoet provide support for monitor
objects.
Finally, the poet::acyclic_mutex class provides
a wrapper for mutex classes which adds automatic validation of a program's
mutex locking order. Following a consistent locking order ensures your program
will not deadlock due to problems such as "deadly embrace" or the "dining philosophers"
problem.
A version of this documentation corresponding to the most recent release should be available online at http://www.comedi.org/projects/libpoet/boostbook/doc/boostbook/html/index.html
The library's API is still undergoing some development, and may be refined as feedback and experience clairifies areas which could be improved. It is anticipated that some interfaces will change to keep in sync with API changes in the Boost libraries, and to keep in sync with relevant changes and additions to the C++ standard.
libpoet depends on the Boost C++ libraries, and requires linking to libboost_thread. The headers from the active object portion of libpoet depend on thread_safe_signals.
libpoet versions 2008-05-16 or later require Boost version 1.35.0 or later, due to changes in the Boost.Thread interface.
libpoet versions 2008-01-28 or earlier require Boost version 1.34.1 or earlier due to changes in the Boost.Thread interface.
The most recent release is available from the Boost Vault (get the latest "libpoet-xxxx-xx-xx.tgz" file).
The current source code is also availabe via anonymous cvs:
cvs -d:pserver:anonymous@cvs.comedi.org:/cvs/comedi login cvs -d:pserver:anonymous@cvs.comedi.org:/cvs/comedi co libpoet
When prompted for a password, hit enter.
You can also browse the cvs online.
The code (and this documentation) is licensed under the Boost Software License, Version 1.0.
libpoet is a header-only library. It may be used by simply unpacking the files and adding the location of the top-level directory (which contains the "poet/" subdirectory) to your compiler's include path. Alternatively, you may move the "poet/" subdirectory into an existing include directory which is already in your include path.
libpoet has a mailing list hosted on Google Groups, which may be used to discuss issues related to the library.