Skip to content

Commit 29dc91c

Browse files
authored
Update GIL.jl (#538)
I think "unlock" is a typo and should be "lock". Hence, a GIL lock "lock, computes, unlock" rather than "unlock, compute, unlock"
1 parent 379f16c commit 29dc91c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GIL/GIL.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using ..C: C
1212
"""
1313
lock(f)
1414
15-
Unlock the GIL, compute `f()`, unlock the GIL, then return the result of `f()`.
15+
Lock the GIL, compute `f()`, unlock the GIL, then return the result of `f()`.
1616
1717
Use this to run Python code from threads that do not currently hold the GIL, such as new
1818
threads. Since the main Julia thread holds the GIL by default, you will need to
@@ -32,7 +32,7 @@ end
3232
"""
3333
@lock expr
3434
35-
Unlock the GIL, compute `expr`, unlock the GIL, then return the result of `expr`.
35+
Lock the GIL, compute `expr`, unlock the GIL, then return the result of `expr`.
3636
3737
Use this to run Python code from threads that do not currently hold the GIL, such as new
3838
threads. Since the main Julia thread holds the GIL by default, you will need to

0 commit comments

Comments
 (0)