Creating a task

To create a new task, instantiate a subclass of TThreadProgram to encapsulate the program and schedule for a new thread, and use it to construct a main thread for the new task:

      TSomeThreadProgram aProgram(constructor arguments);
      TTaligentTaskHandle* aTask = new TTaligentTaskHandle(aProgram);
In this example, the new task's main thread runs its own copy of the thread program.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker