Release method can be called from any thread

Hi everyone.

At the beginning of this lecture it is said that: “A Lock object can only be unlocked by a thread that locked it in the first place.”

However, python doc for “release” method states that: “This can be called from any thread, not only the thread which has acquired the lock.”.

For my point of view the two statements are in contradiction.
Can you please explain me what you mean with the statement in the tutorial?

Thank you in advance.

Type your question above this line.


1 Like