Skip to content

Instantly share code, notes, and snippets.

# this is a job interview simulation unfair read write lock in python attempt
# i did not run this
class Barrier(object):
def __init__(self):
self.condition = threading.Condition()
self.released = False
def await(self):
with self.condition: