| ★ wanayoo — archive 1999 http://zthread.sourceforge.net/ | Nouvelle recherche | Portail wanayoo |
|
ZThread Library
|
Author:
Eric Crahen <crahen@buffalo.edu>
Overview:
The ZThread library is an advanced, object-oriented
mutli-threading library. It provides a set of objects to create and control
interruptable threads. Also included are many objects that are the embodiment of
useful synchronization design patterns. This library is completely
object-oriented. It is not just another thread wrapper.
The threads created in this project are interruptable. That means
that you can interrupt() a thread and cause it to throw an
Interrupted_Exception at any interruption points that would normally
block a thread (Semaphores, Conditions etc). This provides
execellent control over how a thread exits and deals with
errors.
The design patterns, encompassed in classes such as
the Executor & Guard, are most interesting part of this project; and it
those patterns - and others which may not yet have been added which really
interest me. If you have suggestions or documention for new and useful patterns
please let me know.
The source code you will find for this project has been made available
under the GPL.
If you do find it useful and have suggestions I would like to know.
NEW:
07-29-2000: Added FastMutex classes for better performance
Features:
This library has been designed to abstract the underlying platform specific implementations away from the objects and patterns that this library provides. This has several advantages. One is that if maintence to the iimplementation is required, changes can be made with out breaking existiing code. The second, and greater advantage, is that is easy to move code between platforms with out the need to rewrite any code to use the threading mechanism native to the new platform.
Basic threading objects: (interfaces denoted with <>'s)
- Interruptable Threads
- FastMutex, Mutex, Condition, Semaphore, RWLock
- < Lockable >
- < Reference classes >
Patterns:
- Guard (used with any Lockable objects)
- Executor (DirectExecutor, QueuedExecutor, PoolExecutor)
- Latch, Barrier
- Queue (ProtectedQueue, BlockingQueue)
- < Reference classes>
- Singleton, SharedInstance, AutoPtr
Browsing through the documentation will probably give you a
better idea of what this
library really lets you do.
Documentation:
The documents are
included in the source code for this project. Readable documents have been
generated using Doxygen. You can browse those documents here.
Future:
As I have mentioned above I am intrested in receiving feedback
and suggestion from those who use this library. Hopefully, this will prove to be
useful to many people and will under go some further development. In the end I
hope to compile either some papers or and/or a book on this subject.
Download:
Currently this site is being hosted by SourceForge.net and you can
download the
latest release and pariticpate in discussion boards there.
However, feel free to email me directy.