Skip to content

Commit

Permalink
Merge pull request #84 from tbielawa/thread_safe_ctx_mgr_notes
Browse files Browse the repository at this point in the history
Note that context managers are not thread-safe
  • Loading branch information
tbielawa committed Sep 13, 2018
2 parents 01f5999 + c14d298 commit 58ad3ac
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docsite/source/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,17 @@ This section describes all of the `context managers
<https://docs.python.org/2/reference/datamodel.html#context-managers>`_
provided by the bitmath class.

.. warning::

It is a known limitation that the bitmath context managers are
**not thread-safe**. You may get unexpected results or errors using
these in a threaded environment.

The suggested workaround is to apply formatting to each object
instance directly. See the instance :ref:`format
<instances_format>` method docs for additional reference.


.. note::

For a bit of background, a *context manager* (specifically, the
Expand Down

0 comments on commit 58ad3ac

Please sign in to comment.