Skip to content

Improve alpide checks

Marc Konig requested to merge mk-improve-alpide-checks into master
  • Make an analyze module that contains the views and validators modules
  • Add a ctrlc handler to gracefully shutdown on CTRL+C but allow a more ungrateful shutdown if CTRL+C is pressed twice
    • Resolves #33 (closed)
    • Fix issue where reader thread hangs if the validator channel is shut down early (on stop flag) AND the reader is already waiting for available space in the sender channel FIFO. Issue occurred because an extra clone of the reference to the reader sender channel had to be made, for the case where the writer thread is spawned, to satisfy the borrow checker. But that extra clone was not dropped when the writer thread was not spawned. This is not an issue when the reader thread exits after reading all input data, but when it should exit because of the stop flag AND it was already waiting for the sender channel to have room for the next cdp_chunk, it would wait indefinitely because the channel was never pop'ed from but also not disconnected from, which means the stop flag is never checked again by the reader thread. The issue was resolved by manual calls to drop for cases when the writer thread is not spawned.
Edited by Marc Konig

Merge request reports