# alg_dead_lock.py
#
# Deadlock by acquiring waiting on the same lock twice

# We want all the symbols from sim161
from sim161 import *

def main( args ):

    lock = lock_create( "the_lock" )

    # Acquire the lock
    lock_acquire( lock )

    # And again, while we still hold it
    lock_acquire( lock )
