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

Update GIL.jl lock's documentation (possible mistake?) #538

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/GIL/GIL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using ..C: C
"""
lock(f)

Unlock the GIL, compute `f()`, unlock the GIL, then return the result of `f()`.
Lock the GIL, compute `f()`, unlock the GIL, then return the result of `f()`.

Use this to run Python code from threads that do not currently hold the GIL, such as new
threads. Since the main Julia thread holds the GIL by default, you will need to
Expand All @@ -32,7 +32,7 @@ end
"""
@lock expr

Unlock the GIL, compute `expr`, unlock the GIL, then return the result of `expr`.
Lock the GIL, compute `expr`, unlock the GIL, then return the result of `expr`.

Use this to run Python code from threads that do not currently hold the GIL, such as new
threads. Since the main Julia thread holds the GIL by default, you will need to
Expand Down
Loading