def create_threads()

in DynamoDB-SDK-Examples/python/WorkingWithScans/scan_parallel.py [0:0]


def create_threads():
    thread_list = []

    # Instantiate and store the thread
    for i in range(threads):
        thread = threading.Thread(
            target=scan_table, args=(i, threads))
        thread_list.append(thread)

    # Start threads
    for thread in thread_list:
        thread.start()

    # Block main thread until all threads are finished
    for thread in thread_list:
        thread.join()