.. # split from OESystemFunctions.rst:1391

.. include:: ../substitutions

.. oe:namespace:: OESystem

.. meta::
   :keywords: OEGetThreadSafe

.. oe:function:: OEGetThreadSafe

   .. oe:language:: c++ java csharp

      .. oe:api::

         bool OEGetThreadSafe()

   .. oe:language:: python

      .. oe:api:: python

         OEGetThreadSafe() -> bool

   Reports  whether *OESystem* memory  allocation  uses
   thread-safe  mutual  exclusion to  access  its  data structures.  By
   default, this value is ``true``. This allows *OEChem* molecules and other
   toolkit objects  to be allocated and  deallocated simultaneously in
   concurrent operating system threads. However, for applications that
   only  have a  single thread  of execution,  the use  of thread-safe
   memory allocation  can cause a  small performance overhead  on some
   platforms. Setting  this value to ``false``,  using the :oe:func:`OESystem::OESetThreadSafe`
   function can be  used to instruct *OESystem* (and  the toolkits built
   upon it) to use faster implementations when it is known to be safe.

