Skip to content

Commit 9fbddef

Browse files
Merge pull request #1103 from jacobdr/1102-docs-for-intemporary-directory
DOC: Update documentation for InTemporaryDirectory to note it as not thread-safe Closes #1102
2 parents 7cfaebf + 420164a commit 9fbddef

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

nibabel/tmpdirs.py

+6
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ def __exit__(self, exc, value, tb):
5151
class InTemporaryDirectory(TemporaryDirectory):
5252
""" Create, return, and change directory to a temporary directory
5353
54+
Notes
55+
------
56+
As its name suggests, the class temporarily changes the working
57+
directory of the Python process, and this is not thread-safe. We suggest
58+
using it only for tests.
59+
5460
Examples
5561
--------
5662
>>> import os

0 commit comments

Comments
 (0)