acts-project / acts-project/acts
Some writers performs their writes in the destructor
- 主要語言
- C++
- 星號
- 131
- 分支
- 277
- 平均合併
- 3 天 13 小時
- 30 天內合併 PR
- 112
描述
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?
貢獻指南
研究方向
Start by reading Sequencer::run, JsonMaterialWriter, and MaterialMapping, then review the seven-comment discussion and the two proposed lifecycle designs. The scope is not settled; done would require an agreed write lifecycle in which writes no longer depend on destructor deallocation and the selected design is implemented consistently.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- cpp
- 領域
- backend
- Issue 類型
- 重構
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100