MThreadAsync Class Reference
[OpenMaya - API module for common classes]

#include <MThreadAsync.h>

List of all members.


Detailed Description

Methods for creating threads.

MThreadAsync class. Allows creation of asynchronous threads.

Static Public Member Functions

static MStatus init ()
static MStatus createTask (MThreadFunc func, void *data, MThreadAsyncCallbackFunc afunc, MThreadRootTask *root)
static void release ()


Member Function Documentation

MStatus MThreadAsync::init (  )  [static]

Initialize asynchronous thread creation mechanism. No threads are created by this call. Each call to init increases a reference count on the class, each call to release() reduces the reference count. When the reference count reaches zero the threads are deleted.

Returns:
Examples:

MStatus MThreadAsync::createTask ( MThreadFunc  func,
void *  data,
MThreadAsyncCallbackFunc  afunc,
MThreadRootTask *  root 
) [static]

Create a single task. createMapping must have been called before calling this method.

Parameters:
[in] func pointer to function to be executed by threads
[in] data data for function
[in] afunc pointer to callback function to be executed by threads
[in] root root task
Returns:
Examples:

void MThreadAsync::release (  )  [static]

This function decreases the reference count on the class. When the reference count reaches zero the threads are deleted.

Examples:


Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6