Aug-20-2019, 09:59 PM
i'm writing a class to execute commands in a pool that limits the number of processes that can be started concurrently. single commands and command pipelines can be executed. the number of commands in a pipeline is counted as the number of processes. it can't know if some command runs more than one process. commands are given to it in a
does anything like this already exist? i have looked at multiprocessing.pool and has nothing like this.
i am also interesting in any suggestions for features i should include in the class i am creating or the future version of it.
.cmd()
method and they are started in the order given, delayed to keep the total number from exceeding the limit. pipelines may not be longer than the limit. no indication is given to the caller about command completion, but i am planning to make a more advanced class in the future that includes that. the other method is .join()
to wait for the queue of commands to all complete. the limit for number of processes is given when the instance is created. commands are a list (or tuple) of separated tokens (command name and arguments, str, bytes, or bytearray). a command pipeline is a list (or tuple) of commands.does anything like this already exist? i have looked at multiprocessing.pool and has nothing like this.
i am also interesting in any suggestions for features i should include in the class i am creating or the future version of it.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.