Skip to content

Consider making non-unix variant of Assembly::run() #3

@simonhollingshead

Description

@simonhollingshead

It would be nice if there was a default run() when #[cfg(not(unix))] which just handled the multiplatform ctrl-c handler and nothing else, just so that binaries compile and run multiplatform.

https://docs.rs/tokio/latest/tokio/signal/fn.ctrl_c.html

Tokio does separately provide Windows-specific signals, https://docs.rs/tokio/latest/tokio/signal/windows/index.html that you could implement instead, but I suspect that in reality if there ever was a production ready Windows comprehensive server, it would use windows-service crate and then want to forward things like SERVICE_CONTROL_STOP... and therefore it would call run_with_termination_signal directly so it could construct the stream itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions