\"\" \"\" \"\"
Go backward to Template Types
Go up to RT++ Type Declarations
Go forward to Thread Bags
RISC-Linz logo

Threads

In a similar fashion, also those types have to be declared on which threads and thread bags are based. If we want to create a thread
Threadn<R, A1, ..., An> t(f, a1, ..., an);
we have to provide the corresponding global declaration  
ThreadArgn(Id, R, A1, ..., An);
in one C++ source file. Id is an arbitrary identifier not in use anywhere else (it is internally used by the macro because of the previously explained problem with template types).

Likewise, if we want to define a thread handle  

Thread<R> t;
we have to provide the global declaration  
ThreadRes(R);
If one forgets some of the required declarations, the linker complains with error messages as that shown above (mentioning the internal types ArgumentThread and ResultThread, respectively).  
Author: Wolfgang Schreiner
Last Modification: April 12, 1997