Return a value from within the Task Programming Model
MapleTaskReturn( kv, void *value, void (M_DECL *MarkFunction)( void * ) )
kernel handle of type MKernelVector
a pointer to the output struct for the root task
the function called when a garbage collection occurs
The MapleTaskReturn function allows a task to stop the current invocation of the Task Programming Model and to cause a value to be returned to MapleStartRootTask.
Calling MapleTaskReturn does not abort currently executing tasks, however new tasks from the current invocation of the Task Model will not be started.
MapleTaskReturn returns $1$ for the first call in the current invocation of the Task Model and $0$ for any subsequent calls. The value passed into MapleTaskReturn when it returns $1$ is the value that will be returned.
The MarkFunction parameter is used to mark value if a garbage collection occurs before the MapleStartRootTask returns. If value does not need to be marked, $NULL$ can be passed for MarkFunction.
MapleTaskReturn is the external call equivalent of Threads:-Task:-Return.
Download Help Document
What kind of issue would you like to report? (Optional)