From adbead9d461dbe597d34e2571c3c7f6ea2dced67 Mon Sep 17 00:00:00 2001 From: Camilo De La Torre <64303300+camilodlt@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:09:12 +0200 Subject: [PATCH] Update GIL.jl I think "unlock" is a typo and should be "lock". Hence, a GIL lock "lock, computes, unlock" rather than "unlock, compute, unlock" --- src/GIL/GIL.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GIL/GIL.jl b/src/GIL/GIL.jl index fb5730bd..2ff90c12 100644 --- a/src/GIL/GIL.jl +++ b/src/GIL/GIL.jl @@ -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 @@ -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