One discussion on Discord today reminded me about a minor problem that we have.
Server installation (whole server start process rather) runs on ST's async thread. Installing a server can take a relatively long time (depends on the size and connection speed) and this blocks the async thread for the whole time. Async thread is shared between all packages so this is not good. I've noticed that you can't, for example, open Terminus panel while server is installing.
We should ideally run server installation (or rather the whole start_async process) in a dedicated thread to avoid this issue. This should not cause any message ordering issues because the first initialize message would be triggered later and from ST's async thread.
The only tricky part would be to prevent multiple start requests from coming in for the same server while server is already starting. Something that currently is handled by the sole fact that the async thread is blocked.
One discussion on Discord today reminded me about a minor problem that we have.
Server installation (whole server start process rather) runs on ST's async thread. Installing a server can take a relatively long time (depends on the size and connection speed) and this blocks the async thread for the whole time. Async thread is shared between all packages so this is not good. I've noticed that you can't, for example, open Terminus panel while server is installing.
We should ideally run server installation (or rather the whole
start_asyncprocess) in a dedicated thread to avoid this issue. This should not cause any message ordering issues because the first initialize message would be triggered later and from ST's async thread.The only tricky part would be to prevent multiple start requests from coming in for the same server while server is already starting. Something that currently is handled by the sole fact that the async thread is blocked.