Skip to content

Conversation

2ndDerivative
Copy link
Contributor

I am aware that windows isn't supposed to supported officially, but this would at least help the server executable compile on windows.

I hope it's not too inconvenient if I go through some of the hiccups a windows user might have when trying to get this running on their platform

Comment on lines +155 to +161
tokio::select! {
_ = ctrl_break => {},
_ = ctrl_c => {},
_ = ctrl_close => {},
_ = ctrl_logoff => {},
_ = ctrl_shutdown => {},
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need all of them? if this is just for local development, shouldn't e.g. ctrl_c be sufficient? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, I just figured I'd use them all while they're not placed.

To be fair I didn't find the recommended semantics for the signals to be particularly well-documented

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since I don't have a Windows machine here, can you check if the following is sufficient and compiles?

#[cfg(windows)]
async fn shutdown_signal() {
    ctrl_c()
        .expect("failed to install signal handler")
        .recv()
        .await
}

it's a bit unfortunate that CI won't be able to check that this actually compiles since we run CI only on Unix, but I don't think it makes sense for us to run CI on Windows too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants