import multiprocessing


def make_pool_with_counter(n_threads):
    """Create a new Process pool with a shared progress counter.

    :param n_threads: number of processes
    :type n_threads: int

    :return: (Process pool, progress counter, lock)
    :rtype: (multiprocessing.Pool, multiprocessing.Value, multiprocessing.Lock)
    """
    manager = multiprocessing.Manager()
    counter = manager.Value('I', 0)
    lock = manager.Lock()
    pool = multiprocessing.Pool(n_threads)
    return pool, counter, lock