FAQ
From BoofCV
Jump to navigationJump to search
Frequently Asked Questions
- Is BoofCV Thread Safe?
Unless a class explicitly states that it is thread safe you should assume that it is not. In practice, if you are calling a static function in a Util* or *Ops class there is a good chance that it is thread safe. Classes tend to recycle data structures each time they are invoked and are extremely not thread safe. For example, if a feature detector returned a Point2D_F32 with the feature's location then it owns that data structure and will reuse it the next time its invoked. If you need to save the value of a returned data structure make a copy of it. To get around this issue each thread should have its own instance of a class.