# # ch16/example3.py
#
# ______ th..
# ____ c__.f.. ______ TPE..
# ______ ti..
# ______ matplotlib.pyplot __ plt
#
# c_ LockedCounter
#     ___  -
#         value _ 0
#         lock _ ?.L..
#
#     ___ increment x
#         w__ l..
#             new_value _ v.. + ?
#             t__.s.. 0.001 # creating a delay
#             value _ ?
#
#     ___ get_value
#         w__ l..
#             ? ?
#
#         r_ ?
#
# n_threads _    # list
# times _    # list
# ___ n_workers __ ra.. 1, 11
#     n_t_.ap.. ?
#
#     counter _ ?
#
#     start _ t__.t__
#
#     w__ TPE.. m_w.._? __ executor
#         ?.m.. c__.i..  1 ___ i __ ra.. 100 * n_
#
#     t__.ap.. t__.t__ - s..
#
#     print _*Number of threads: |n_ ')
#     print _*Final counter: |c__.g_v.. .
#     print _*Time taken: |t.. -1 ; .2_| seconds.
#     print('-' * 40)
#
# ?.pl.. n_t.. t..
# ?.xl..('Number of threads'); ?.yl..('Time __ seconds')
# ?.s..

b7e5d92ed373b0e4411c7e25394abecd1035c2f9
# # ch16/example3.py
#
# ______ th..
# ____ c__.f.. ______ TPE..
# ______ ti..
# ______ matplotlib.pyplot __ plt
#
# c_ LockedCounter
#     ___  -
#         value _ 0
#         lock _ ?.L..
#
#     ___ increment x
#         w__ l..
#             new_value _ v.. + ?
#             t__.s.. 0.001 # creating a delay
#             value _ ?
#
#     ___ get_value
#         w__ l..
#             ? ?
#
#         r_ ?
#
# n_threads _    # list
# times _    # list
# ___ n_workers __ ra.. 1, 11
#     n_t_.ap.. ?
#
#     counter _ ?
#
#     start _ t__.t__
#
#     w__ TPE.. m_w.._? __ executor
#         ?.m.. c__.i..  1 ___ i __ ra.. 100 * n_
#
#     t__.ap.. t__.t__ - s..
#
#     print _*Number of threads: |n_ ')
#     print _*Final counter: |c__.g_v.. .
#     print _*Time taken: |t.. -1 ; .2_| seconds.
#     print('-' * 40)
#
# ?.pl.. n_t.. t..
# ?.xl..('Number of threads'); ?.yl..('Time __ seconds')
# ?.s..
