Closed
Description
Most of the new thread safe classes are using a single static mutex for all instances. This guarantees thread safety across multiple objects, but prevents multiple independent peripherals from being used simultaneously. Kind of inconvenient, but developers can override the virtual lock()
and unlock()
methods to disable the mutex so not a big deal.
However, AnalogOut
, CAN
, SPI
, and Serial
are using separate mutexes for each instance. This guarantees nothing unless the developer creates a single object and passes it around, which is not the way these objects have historically been used. Is this implementation a mistake, or by design?
Metadata
Metadata
Assignees
Labels
No labels