Skip to content

Change main_event_loop to provide ability for app to exit #87

@nazmulidris

Description

@nazmulidris

Currently the only way to exit the tui engine is for the launcher.rs to provide exit keys to the main_event_loop. Change this so that there is a EventPropagation::Exit which allows an app to also exit itself, w/out relying on the exit keys support. This also allows the app to perform its own cleanup which is critical when there are files, databases, network, caches that need to be cleaned up.

More info:

  1. https://crates.io/crates/ctrlc
  2. https://rust-cli.github.io/book/in-depth/signals.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions