Skip to content

Commit e4dc773

Browse files
committed
Improve macro docstring
1 parent 73e7b68 commit e4dc773

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

docs/src/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ They divide neatly into two kinds of functions: those which are used to manipula
1111
[`TapedTask`](@ref)s, and those which are intended to be used _inside_ a
1212
[`TapedTask`](@ref).
1313

14-
## Manipulation of [`TapedTask`](@ref)s:
14+
## Manipulation of [`TapedTask`](@ref)s
1515
```@docs; canonical=true
1616
Libtask.consume
1717
Base.copy(::Libtask.TapedTask)
1818
Libtask.set_taped_globals!
1919
```
2020

21-
## Functions for use inside a [`TapedTask`](@ref)s:
21+
## Functions for use inside a [`TapedTask`](@ref)s
2222
```@docs; canonical=true
2323
Libtask.produce
2424
Libtask.get_taped_globals

src/copyable_task.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,14 @@ might_produce(::Type{<:Tuple}) = false
364364
365365
If `f` is a function that may call `Libtask.produce` inside it, then `@might_produce(f)`
366366
will generate the appropriate methods needed to ensure that `Libtask.might_produce` returns
367-
`true` for all relevant signatures of `f`. This works even if `f` has methods with keyword
368-
arguments.
367+
`true` for **all** relevant signatures of `f`. This works even if `f` has methods with
368+
keyword arguments.
369+
370+
!!! note
371+
Because `@might_produce f` is applied to all possible signatures, there may be
372+
performance penalties associated with marking `f` as produceable if it is only
373+
applicable to a specific method signature. If performance is critical, please use the
374+
[`might_produce`](@ref) function directly.
369375
370376
```jldoctest might_produce_macro
371377
julia> # For this demonstration we need to mark `g` as not being inlineable.

0 commit comments

Comments
 (0)