Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: @lock is missing a compat version note #52879

Closed
IanButterworth opened this issue Jan 12, 2024 · 1 comment · Fixed by #52894
Closed

Docs: @lock is missing a compat version note #52879

IanButterworth opened this issue Jan 12, 2024 · 1 comment · Fixed by #52894
Labels
docs This change adds or pertains to documentation

Comments

@IanButterworth
Copy link
Member

julia/base/lock.jl

Lines 248 to 263 in 5b6a94d

"""
@lock l expr
Macro version of `lock(f, l::AbstractLock)` but with `expr` instead of `f` function.
Expands to:
```julia
lock(l)
try
expr
finally
unlock(l)
end
```
This is similar to using [`lock`](@ref) with a `do` block, but avoids creating a closure
and thus can improve the performance.
"""

@IanButterworth IanButterworth added the docs This change adds or pertains to documentation label Jan 12, 2024
@IanButterworth
Copy link
Member Author

It was added in Julia 1.3 but only exported in 1.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant