Skip to content

Commit de373e4

Browse files
committed
Added warning in constructor and documentation
1 parent 916ddfe commit de373e4

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

nipype/algorithms/misc.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,10 +1166,19 @@ class AddCSVRowOutputSpec(TraitedSpec):
11661166
csv_file = File(desc='Output CSV file containing rows ')
11671167

11681168
class AddCSVRow(BaseInterface):
1169-
"""
1170-
Short interface to add an extra row to a text file
1169+
"""Simple interface to add an extra row to a csv file
1170+
1171+
.. warning::
1172+
1173+
This interface is not thread-safe in multi-proc mode when
1174+
writing the output file.
1175+
1176+
1177+
.. note::
1178+
11711179
Requires pandas - http://pandas.pydata.org/
11721180
1181+
11731182
Example
11741183
-------
11751184
@@ -1186,6 +1195,7 @@ class AddCSVRow(BaseInterface):
11861195
output_spec = AddCSVRowOutputSpec
11871196

11881197
def __init__(self, infields=None, force_run=True, **kwargs):
1198+
warnings.warn('AddCSVRow is not thread-safe in multi-processor execution')
11891199
super(AddCSVRow, self).__init__(**kwargs)
11901200
undefined_traits = {}
11911201
self._infields = infields

0 commit comments

Comments
 (0)