Matrix1 Utility Plug-ins

# CREATE COROUTINE

Syntax

CREATE COROUTINE Coroutine ID, Function Pointer CREATE COROUTINE Coroutine ID, Function Pointer, Stack Size

Description

This command will create a coroutine based upon the function pointer specified. The function should accept no arguments, and return no value. The first form of this command will allocate a stack of 1 MB. The second form of this command will allocate a stack of the size specified in kilobytes, i.e. If you specify 1024, you will get 1 megabyte of stack. In addition, the stack size actually allocated will be rounded up to the next 64 KB boundary. The Coroutine ID should be a number 1 to 1024 inclusive. 0 is reserved to identify the main process. Take care when creating coroutines - remember that each coroutine will use up the amount of memory equivalent to the stacksize you specify when you create it. Try to keep the number of coroutines to the smallest number you can.

Go back to ...

Matrix1Util_20 Commands Menu
Matrix1 Utils Main Index
Matrix1 Utils Command List
Commands Menu
Main Menu

Copyright © Ian Mold - Matrix1 Software 2006 - 2011