DM1 Threads Library 1.0.5
DM1 Thread Library is part of the DM1 project
DM1 Thread Library is part of the DM1 project. This library was born out of my need to have a portable C++ Thread library that would be simple to use, and would provide all the necessary Threads functionality I required for the DM1 project.
Initially, this library was in C, but when I decided to re-write DM1 in C++, I ported the library to C++. During the port, I enhanced the functionality of the Threads library.
The DM1 Threads library aims to be small. It does not try to provide a comprehensive set of functionality, but only what is absolutely essential for a project like DM1. I had the simplicity of the Java Threads package in mind when creating this library.
The constructs provided by the DM1 Thread library are:
Thread objects that represent Operating System threads.
A Mutex is provided as a mechanism for Mutual Exclusion . Mutexes are used to ensure that a piece of code is executed by only one thread at any point in time.
Events are provided as low-level mechanisms for thread synchronisation. Events can be waited for, and signalled to.
A higher level object, that combines the functionality of an Event and a Mutex, is provided. This is the Monitor object. A Monitor can be locked exclusively, just like a Mutex, but it can also be made the object of a Wait operation. The signalling mechanism supports notification of one or more waiting threads.
To enable more efficient locking when both shared and exclusive access to data is required, Latches are provided.
Apart from the Thread synchronisation primitives described above, the library also provides a ThreadPool for the situation when it is inefficient to create a thread exclusively for a particular task, and it is desirable to share a pool of threads for executing multiple tasks.
The DM1 Threads library was designed with the following principles in mind:
1. Implement the bare minimum that is required. This Threads library does not aim to be a comprehensive threads package.
2. Avoid complex algorithms. If a particular construct is hard to implement correctly on all platforms, avoid it.
3. Document the library.
4. Avoid low level code, such as assembler code to implement Spin locks. Rely on the libraries provided by the Operating System.
5. Avoid holding Mutexes beyond function calls. A DM1 Thread library function will not hold any Mutex locks when it returns.
6. Avoid using clever C++ techniques wherever possible. (Unfortunately, some cleverness is required to implement the Thread class correctly).
7. Avoid dependency on external libraries. The DM1 library only requires the standard C library, apart from native Threads functionality.
8. Always report an error as soon as it is discovered.
9. Insert debug messages that can be switched on at run-time.
10. Do not throw exceptions from destructors because these might be executing as a result of an uncaught exception.
11. Never let an error go unreported.
the dm1 threads library thread library the library dm1 thread library was this library are provided low level apart from implement the the thread operating system
Download DM1 Threads Library 1.0.5
JThread 1.2.0 (by Mathy Vanvoorden)
JThread project provides some classes to make use of threads easy on different platforms.
The classes are actually rather simple wra
GNU Pth 2.0.7 (by Ralf S. Engelschall)
Pth is a very portable POSIX/ANSI-C based library for Unix platforms which provides non-preemptive priority-based scheduling for mult
libfilo 0.11 (by Alberto Bertogli)
libfilo is a small portable library to do userspace file locking, like fcntl(), lockf() or flock(), but within threads.
If you wan
libwp 0.1 (by Gary Pennington)
libwp provides a simplified facility for a common use of threads, processing tasks using a pool of threads.
libwp is implemented w
TDA 1.1 (by irockel)
TDA goal is to provide a small utility helping offline analysis of production enviroments like application servers.
There is a qui
JDumpViewer 0.2 (by Scott Bartram)
JDumpViewer is a tool for analyzing Java thread dumps.
· detect and handle parse exceptions - display info to u
libbsl 0.9.1 (by Jan Uschok)
libbsl (Basic System Library) is a powerful, easy to use and fully thread safe C++ template class library for frequently recurring (m
Other software in this category
zlib 1.2.3 (by Jean-loup Gailly)
zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp
libxml2 2.6.27 (by DV)
Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i
GNU C library 2.4 (by Andreas Jaeger)
GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.
GNU C library is us
jEdit 4.3 pre8
jEdit is an Open Source text editor written in Java
Surf the Internet in a safer, faster, and easier way with Opera browser
GNU Aspell 0.60.4
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell