I believe the while 1: pass is there to keep the main thread alive
until all the readers are done. If you want the program to end after
the readers are done you can append them all to a list then iterate
through and wait for the threads to join()

if __name__=="__main__":

    library = Library()
    readers = input("Number of Readers?")
    readerlist = []
    for i in range(1,readers):
        newReader = Reader(library, "Reader" + str (i),
random.randint(1,7), random.randint(1,7))
        newReader.start()
        readerlist.append(newReader)
    for reader in readerlist:
        reader.join()

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to