Skip to content

Commit

Permalink
Add note advising caution when using hist task that captures by refer…
Browse files Browse the repository at this point in the history
…ence
  • Loading branch information
hdelan committed Dec 7, 2023
1 parent 64950fb commit f88128c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14622,6 +14622,14 @@ interoperability member functions provided by the [code]#interop_handle# class.

Local <<accessor,accessors>> cannot be used within a <<host-task>>.

[NOTE]
====
If a C++ lambda is passed to a <<host-task>>, the lambda may capture by
reference or by value. Since the <<host-task>> callable executes asynchronously,
care must be taken to ensure that lifetimes of objects captured by reference by
a <<host-task>> lambda last at least until the <<host-task>> completes.
====

// TODO: access mode/target resolution rules

[source,,linenums]
Expand Down

0 comments on commit f88128c

Please sign in to comment.