TThread

Toms' Thread Library
by Tom Stanis

What is it?

TThread is a Cross-platfrom (Windows and Unix) object oriented threading library. It supports starting, stoping, and reaping of threads, along with mutexes, conditional variables, and messages for synchronization. Internally the library uses pthreads on Unix systems and Windows threads on MS Windows. TThread was designed with simplicity and usability in mind while maintining a powerful, protable architecture.

History

A while ago I was taking a networking class and needed a threading model. I came up with something like this. I added messages to the library early on and it made all of the difference. I think that messaging is one of the most powerful syncronization mechanisms available.

Later, I was working on a personal project and needed such a library again, so I took out the old code, dusted it off, cleaned it up, and released it as TThread 0.1. There have been a few new features and a lot of bug fixes since then.

Why another Thread library?

Most thread libraries are C based. Although they work quite well, useing Object Oriented techniques to do threading is really neat. TThread is quite object oriented and is based on a mixing of the Java thread package and BeOS threading. TThread also uses exceptions for error reporting. I find this method of error handling much easier to work with.

I do not wish to get into holy wars with people about programming languages. I like OO languages, and I like C++. If you don't, then don't use my library.

Downloads

The current release of TThread is 0.2.4.
TThread-0.2.4.tar.gz
TThread-0.2.4.zip

I will make RPMS and DEB packages as soon as I learn how. :)

System Requirements

TThread requires egcs-1.0.3 or latter to build on Unix ( I recommend 1.1.1 ), or Visual C++ 5 or 6 on Windows. On Unix, you will also need pthreads. Info about pthreads is available at http://www.mit.edu:8001/people/proven/pthreads.html Note: If you are running any sort of modern Unix you shouldn't have to worry about this as pthreads is probably included with the base operating system.

Known compatible unix flavors: