Examples that use threading
The following plug-ins can be used to learn how to implement threading in Maya
- threadedBoundingBox: demonstrates the hazards of false sharing in multithreaded code.
- threadingLockTests: performance test for locks and atomic operations.
- splatDeformer: example of threadsafe deformer plug-in.
The threadTestCmd and threadTestWithLocksCmd examples demonstrate the use of the legacy Maya threading classes, MThreadPool, MAtomic, MMutex, MSpinLock, and MAsyncThread. These classes should not be used in your plug-ins. Instead, you are encouraged to use the classes and methods in the TBB libraries shipped with Maya.