コード例 #1
0
ファイル: cansina.py プロジェクト: SkyN9ne/cansina
full_path = args.full_path

# Select if user wants content-type print
show_content_type = args.show_content_type

#
#   Run the main thread until manager exhaust all tasks
#
time_before_running = time.time()
Console.number_of_requests = payload.get_total_requests()
Console.number_of_threads = threads
Console.show_full_path = full_path
Console.show_content_type = show_content_type
Console.set_show_progress(False if args.no_progress else True)
Console.set_show_colors(False if args.no_colors else True)
Console.init()

#
# Create the thread_pool and start the daemonized threads
#
thread_pool = []
for visitor_id in range(threads):
    v = Visitor(visitor_id, payload_queue, manager, manager_lock)
    thread_pool.append(v)
    v.start()

# Main loop
try:
    payload_queue.join()

    for thread in thread_pool: