swamp.utils.threadresults module

class ThreadResults(logger=None)[source]

Bases: object

Class to hold the results from a multi-threaded process

Implements threading.semaphore to regulate thread I/O into a result list

Parameters:

logger (SwampLogger) – logger instance to record log messages

Variables:
  • lock (threading.lock) – lock to control I/O to the result instance
  • value (pandas.DataFrame) – dataframe with the results of the grid search
register(new_results)[source]

Register a set of new results into swamp.utils.threadresults.ThreadResults.value

Parameters:new_results (list) – the new results to be registered