Skip to content

v0.9.5

Choose a tag to compare

@github-actions github-actions released this 07 Oct 14:16
· 7 commits to main since this release
0aa14c1

Libtask v0.9.5

Diff since v0.9.4

Added a new Libtask.@might_produce macro, which generates a superset of the Libtask.might_produce methods needed for a function f that might contain a call to Libtask.produce. For example, for a function

function f(x::Int, y::Int)
    produce(x + y)
end

instead of writing

Libtask.might_produce(::Type{<:Tuple{typeof(f),Int,Int}}) = true

you can just write

Libtask.@might_produce(f)

The main benefit of this is that it applies to functions with multiple methods and keyword arguments. The drawback is performance: marking all methods of f as produceable may lead to performance degradation if there are some methods of f which do not need to be thus marked. In such cases, you should use the might_produce function directly.

Merged pull requests: