[Python] multiprocessing.pool.Pool string back to object

Discussão em 'Python' iniciado por Stack, Setembro 10, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to send a pool to a string and then get it back later to close/join the pool. Here's an example of how to duplicate what I'm doing:

    import multiprocessing

    num_of_p = 5
    _pool = multiprocessing.Pool(num_of_p)
    pool_string = str(_pool)


    Is there a way to turn pool_string back into a multiprocessing.pool.Pool object?

    Continue reading...

Compartilhe esta Página