20 lines
359 B
Python
20 lines
359 B
Python
#!/usr/bin/env python3
|
|
|
|
import ThreadPool
|
|
|
|
if __name__ == "__main__":
|
|
print(dir(ThreadPool))
|
|
tp = ThreadPool.ThreadPool()
|
|
|
|
print("Creating Consumers")
|
|
tp.addConsumer( 2000, 20 )
|
|
tp.addConsumer( 2000, 10 )
|
|
|
|
|
|
print("Create Producers")
|
|
tp.addProducer( 4000, 5 )
|
|
|
|
print("Run all Threads")
|
|
tp.run()
|
|
|
|
print("End of Program")
|