FAQ

From BoofCV
Revision as of 09:10, 23 September 2012 by Peter (talk | contribs) (Created page with "= 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 ca...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Frequently Asked Questions

  1. 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.