Skip to content

Commit

Permalink
Update GIL.jl (#538)
Browse files Browse the repository at this point in the history
I think "unlock" is a typo and should be "lock". 
Hence, a GIL lock "lock, computes, unlock" rather than "unlock, compute, unlock"
  • Loading branch information
camilodlt committed Aug 15, 2024
1 parent 379f16c commit 29dc91c
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 29dc91c

Please sign in to comment.