- README.md: update minimal example (was outdated since a long time 🤐)
- README.md: link to Security part of the wiki
- README.md: fix OpenBSD broken link
- README.md: add `state_directory` option
- activitywatch & server configs: remove from config directory. only
available in the wiki.
- heavy-load: move to new bench directory
- test: move to tests directory
Fix#121
The tokio task that removes the trigger after the last after-action was
not woken up & cancelled by the cancellation token, but left to die when
tokio quits.
Unfortunately this broke the tests, where tokio is kept from one
reaction launch to another. Those tasks kept a reference to the DB, then
preventing it to close, then preventing a new DB instance from being
opened.
This was difficult to debug due to the tests only checking that reaction
quits with an error, but not testing what kind of error it is.
So they now check that reaction quits with the "normal" error, which is
that all streams finished.
The tokio task is now woken up, like the other sleeping tasks, at
shutdown, and quits doing nothing.
It's not very satisfying because I assume it's a bit costly to wake up a
task, so I'm gonna see how I can improve this.
I may start a new tokio runtime for each subtest.
I may delete this task and move its instructions to the last
after-action.
I may do both.
The stream_manager is now the sole owner of the child process handle and
is responsible for cleaning it.
The stream_manager expects a shutdown command from the broadcast channel
it receives as parameter and watches it concurrently with the child process
I/O.
When the shutdown command is received, the child process is killed and the
remaining I/O is processed. Then the child process is reaped. Or it is
killed and reaped after EOF is encountered, would the child process exit
before (or at the same time as) the shutdown command is issued.