Skip to content

Commit da27508

Browse files
committed
expand docs for @__FUNCTION__
1 parent fd8a3d2 commit da27508

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

base/runtime_internals.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ Get the innermost enclosing function object.
184184
In functions like `f() = [@__FUNCTION__ for _ in 1:10]`, this would
185185
refer to the generator function in the comprehension, NOT the enclosing
186186
function `f`. Similarly, in a closure function, this will refer to the
187-
closure function object rather than the enclosing function.
187+
closure function object rather than the enclosing function. Note that
188+
macros like [`@spawn`](@ref Threads.@spawn), [`@async`](@ref), etc., also
189+
create closures.
188190
189191
!!! note
190192
This does not work in the context of callable structs as there is no

0 commit comments

Comments
 (0)