Commit 271072e5 authored by Davis King's avatar Davis King

Clarified the spec regarding thread safety.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403373
parent 62041ca2
...@@ -33,7 +33,7 @@ namespace dlib ...@@ -33,7 +33,7 @@ namespace dlib
/ *! / *!
ensures ensures
- returns a pointer to an instance of a memory_manager object - returns a pointer to an instance of a memory_manager object
where memory_manager_type is defined where memory_manager_type implements the interface defined
by dlib/memory_manager/memory_manager_kernel_abstract.h by dlib/memory_manager/memory_manager_kernel_abstract.h
!* / !* /
}; };
...@@ -45,11 +45,10 @@ namespace dlib ...@@ -45,11 +45,10 @@ namespace dlib
is provided by the factory object's static member get_instance(). is provided by the factory object's static member get_instance().
THREAD SAFETY THREAD SAFETY
This object must be used with care in a threaded program. The exact This object is, by itself, threadsafe. However, if you want to use this
steps needed to ensure safe usage in a threaded program depend on object in multiple threads then you must ensure that your factory is
how the factory class is implemented though. threadsafe. This means its factory::get_instance() method should be
threadsafe and the memory_manager object it returns must also be threadsafe.
Also note that only the constructor calls factory::get_instance().
!*/ !*/
public: public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment