.. # split from OESystemFunctions.rst:2374

.. include:: ../substitutions

.. oe:namespace:: OESystem

.. meta::
   :keywords: OESetThreadSafe

.. oe:function:: OESetThreadSafe

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

      .. oe:api::

         void OESetThreadSafe(bool)

   .. oe:language:: python

      .. oe:api:: python

         OESetThreadSafe(arg1: bool) -> None

   Controls whether the internal memory
   allocation and deallocation routines used by *OEChem* (and other
   OpenEye toolkits) should use slower thread-safe implementations, or
   faster single-threaded versions. 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 mutual exclusion can
   cause a small performance overhead on some platforms. The current
   setting can be inspected by calling the :oe:func:`OESystem::OEGetThreadSafe`
   function.

