TaskManagerIO
Loading...
Searching...
No Matches
TaskMgrLock Class Reference

#include <SimpleSpinLock.h>

Public Member Functions

 TaskMgrLock (SimpleSpinLock &theLock)

Detailed Description

A wrapper around the task manager locking facilities that allow you to lock within a block of code by putting an instance on the stack. Be very careful not to use yieldForMicros along with this method of locking. For example:

void myFunctionToLock() {
TaskSafeLock(myLock);
// do some work that needs the lock here. lock will always be released.
// never use yieldForMicros(..) here or your code may deadlock.
}
Definition SimpleSpinLock.h:17

The documentation for this class was generated from the following file: