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 version 1.39 or later, and requires linking to the Boost.Thread library (libboost_thread).
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 Subversion:
svn co http://svn.boost.org/svn/boost/sandbox/libpoet/trunk libpoet
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.