acts-project / acts-project/acts
Some writers performs their writes in the destructor
Open
Stale
- Dominant language
- C++
- Stars
- 131
- Forks
- 276
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 112
Description
I understand why this is done, but it is likely not a great situation. I think writing should occur at the end of `Sequencer::run` and not when the sequencer is deallocated.
I propose we either:
1. Refactor `JsonMaterialWriter` (and consequently `MaterialMapping`) so that it can become an `IWriter`, that gets an `endRun` call when the event loop finishes.
2. Add functionality to `Sequencer` such that algorithms also receive an `endRun` (or `finalize`?) call, so that `MaterialMapping` can call a write function on `JsonMaterialWriter`.
What do you think @Corentin-Allaire?
Contributor guide
Assessment
This issue has not been assessed yet.