Skip to content

Process Report in a separate thread #119

@lrntct

Description

@lrntct
  • Make sure that SimulationData contains only data structures that can be deepcopied
  • Remove the background processing of raster from Igis
  • Add a new worker function that pull from the queue and process everything that is now done in step()
  • In Report.__init__ create the queue and the thread
  • Refactor Report.step() to make a deepcopy of SimulationData and last_step, and add them to the writing queue
  • Decide how to handle the update of self.output_maplist and self.vector_drainage_maplist: either update them before adding values to the writing queue, at the risk of having a wrong list if something fails in the writing thread, or create a second queue where the worker will add the names of the written maps. The main thread will then take the values from the queue and update the two lists.
  • In Report.end(), join the queue
  • in __init__, add an option for the writing to be blocking (current implementation), or non-blocking

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions