acts-project / acts-project/acts

Some writers performs their writes in the destructor

Open
#881 7 comments 0 reactions 1 assignee Claimed by @Corentin-Allaire View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.