The following plug-ins can be used to learn how to implement threading in Maya
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.