Skip to content

Commit f91f277

Browse files
committed
[RDF] Clarify that callables used in Define() have to be thread safe.
1 parent b6d84ca commit f91f277

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tree/dataframe/inc/ROOT/RDF/RInterface.hxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ public:
404404
////////////////////////////////////////////////////////////////////////////
405405
/// \brief Define a new column.
406406
/// \param[in] name The name of the defined column.
407-
/// \param[in] expression Function, lambda expression, functor class or any other callable object producing the defined value. Returns the value that will be assigned to the defined column.
407+
/// \param[in] expression Function, lambda expression, functor class or any other callable object producing the defined value. Returns the value that will be assigned to the defined column. This callable must be thread safe when used with multiple threads.
408408
/// \param[in] columns Names of the columns/branches in input to the producer function.
409409
/// \return the first node of the computation graph for which the new quantity is defined.
410410
///
@@ -419,6 +419,7 @@ public:
419419
/// * extraction of quantities of interest from complex objects
420420
///
421421
/// An exception is thrown if the name of the new column is already in use in this branch of the computation graph.
422+
/// Note that the callable must be thread safe when called from multiple threads. Use DefineSlot() if needed.
422423
///
423424
/// ### Example usage:
424425
/// ~~~{.cpp}

0 commit comments

Comments
 (0)