| aMulti_Spawn | Index |
Definition:
Parameters:
| fileID | - | The file to run as a concurrent process. |
| ProcID | - | The process slot to use for the concurrent process. |
Return Value:
Description:
This routine launches a concurrent process. The calling process continues execution. The "main" function in the new process must be declared as "void main(char)" because the aMulti_Spawn function passes the ID of the calling process to the new process.
Example:
(TEA file stored in file slot 0)
#include <aMulti.tea>
void main()
{
aMulti_Spawn(1,3);
(body of program)
}
(TEA file stored in file slot 1)
#include <aMulti.tea>
void main(char callingProcID)
{
(body of program)
}
The first program (0) runs the second program (1) as process 3. After executing the aMulti_Spawn command, the first program continues execution. CPU time is divided evenly between active processes.
Related: