|
Go backward to Representation Go up to Threads Go forward to Basics |
|
Specification: Defines a thread handle t.
Thread<R> sRestrictions: The number of arguments ranges from to an implementation-dependent constant (currently ). This range may be extended by defining the corresponding template class.
Thread<R, A, ..., A> t(f, a, ..., a)
s=t
Implementation: The third form is more efficient than the otherwise equivalent form
Thread<R, A, ..., A> tNormally this form is also equivalent to to
t=Thread<R, A, ..., A>(f, a, ..., a)
Thread<R, A, ..., A> tHowever, if the preprocessor constant
t.create(f, a, ..., a)
RT_THREAD_NOTLAZY is defined before including
the header file rt++.h,
the declaration is equivalent to
Thread<R, A, ..., A> t
t.start(f, a, ..., a)