Abstract
- An extremely easy to use threading messaging tool that is able to let you
call code in other threads like regular function calls
- A C++ wrapper to posix threading primitives
- A fast Pipe class for transmitting data between threads
Download
History
- 1.1.3 is released. It add support for GCC 4.x, and the build system is fixed.
- 1.1.2 is released. It add support for GCC 3.2. I mean it this time. Really.
- 1.1.1 is released. It fixes a bug in a test, and adds support for GCC 3.2.
- 1.1 is released. It fixes several compile bugs in pipe.h, also gets rid of
Pipe<Type>::read(int, Type*, char, bool)
- 1.0 is released. itcproc now has a --strip-include-dirs option (where itcproc ../foo.h will include foo.h into the file.
API Documentation for ITC 1.0
Here.
Manual
Inter-thread Communication System (ITC)
(C) 2001 Charles Samuels <charles@kde.org>
version 1.0 2002-02-26 5:04pm PDT
-----
Easy Stub system for calling functions in other threads.
Complete threading API.
Threadsafe data FIFO (Pipe)
-----
LICENSE: LGPL
-----
Bugs:
- Namespace support is lacking, classes can't be nested (Very well)
- flex code looks like crap
Todo:
- switch to C lex (POSIX), instead of GNU's C++ version
- Switch to autoconf/automake (you don't want it to be too fast...)
-----
To use...
- inherit* from ITC::Base
- put all your exported functions under itcpublic:
(behaves just like public)
- run itcproc --header -o myclass.itc.h myclass.h
- run itcproc -o myclass.itc.cpp myclass.h
- #include "myclass.itc.h" above where you want to use the stubs
- Instanciate the class that inherits ITC::Base
- Instanciate the Stub class
- call functions normally in the stub class
* It MUST end with "Impl"
Example:
FooImpl fooImpl;
// ... [ summon the thread ]
Foo foo(&fooImpl);
foo.whatever();
class FooImpl
{
itcpublic:
void doThis(const vector<string> &strings);
async doThat(); // it returns immediately from the stub
double amazing();
void whatever(double); // ILLEGAL, double needs a name
void whatever(double d); // that's ok
};