diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py index fa64c62bbd14888b7b7725ddf99d006ee641036e..003503d1a81e9caed64a820b077abf8cd901d8ee 100644 --- a/binarycpython/utils/grid.py +++ b/binarycpython/utils/grid.py @@ -927,10 +927,8 @@ class Population: # Set up the manager object that can share info between processes # pathos_multiprocess - queue_size = 1000 - manager = multiprocessing.Manager() - job_queue = manager.Queue(maxsize=queue_size) + job_queue = manager.Queue(maxsize=self.grid_options['max_queue_size']) result_queue = manager.Queue(maxsize=self.grid_options["amt_cores"]) # Create process instances diff --git a/binarycpython/utils/grid_options_defaults.py b/binarycpython/utils/grid_options_defaults.py index 46a097358ed62f3e078eab4f6ddd13ca32abe1f4..98bf8b72ed63f2bae3a660e6bb5b3b8d4554f9d0 100644 --- a/binarycpython/utils/grid_options_defaults.py +++ b/binarycpython/utils/grid_options_defaults.py @@ -34,6 +34,7 @@ grid_options_defaults_dict = { "_commandline_input": "", "log_runtime_systems": 0, # whether to log the runtime of the systems (1 file per thread. stored in the tmp_dir) "_actually_evolve_system": True, # Whether to actually evolve the systems of just act as if. for testing. used in _process_run_population_grid + "max_queue_size": 1000, # Maximum size of the system call queue. Can't be too big! ########################## # Execution log: ########################## @@ -471,6 +472,7 @@ grid_options_descriptions = { "_total_mass_run": "To count the total mass that thread/process has ran", "_total_probability_weighted_mass_run": "To count the total mass * probability for each system that thread/process has ran", "_actually_evolve_system": "Whether to actually evolve the systems of just act as if. for testing. used in _process_run_population_grid", + "max_queue_size": "Maximum size of the queue that is used to feed the processes. Don't make this too big! Default: 1000. Input: int" } ###