Creating Functor-based Runnables
Construct your own functor instance by passing it to one of the static make() functions in the runnable handle class, as shown in Example 3.
Example 3 – Creating a functor-based runnable with a static make function
RWTFunctor<void()> myFunctor = hello;
 
RWThreadFunction myThread;
myThread = RWThreadFunction::make(myFunctor);
All of the runnable handle classes, except for RWRunnableSelf and RWThreadSelf, have static make() functions for constructing the corresponding runnable object.
The functor-based runnable classes each have a make() function that accepts a handle to a functor instance. If you use these functions, you need to construct your own functor instance, and pass a handle for that instance to the make() function.
The threaded runnable classes have make() functions that can also take an RWThreadAttribute instance for use in controlling the attributes of any threads created by the runnable.
You can access lists of these functions under Threads Module on the Modules tab of the SourcePro API Reference Guide.