import threading
from threading import Lock

def print_multi():
    lock = threading.Lock()
    lock.acquire()
    lock.acquire() # this will block

    lock = threading.RLock()
    lock.acquire()
    lock.acquire() # this won't block





print_multi()
0cf6a27cbdb51a4403f1a458a7c2d5b998e14f31
<mask token>

<mask token>


def print_multi():
    lock = threading.Lock()
    lock.acquire()
    lock.acquire()
    lock = threading.RLock()
    lock.acquire()
    lock.acquire()


<mask token>

<mask token>


def print_multi():
    lock = threading.Lock()
    lock.acquire()
    lock.acquire()
    lock = threading.RLock()
    lock.acquire()
    lock.acquire()


print_multi()

import threading
from threading import Lock


def print_multi():
    lock = threading.Lock()
    lock.acquire()
    lock.acquire()
    lock = threading.RLock()
    lock.acquire()
    lock.acquire()


print_multi()

import threading
from threading import Lock

def print_multi():
    lock = threading.Lock()
    lock.acquire()
    lock.acquire() # this will block

    lock = threading.RLock()
    lock.acquire()
    lock.acquire() # this won't block





print_multi()