mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 17:48:56 +01:00
cli: allow client process to control singleton process (#177141)
Other connected clients will now print: ``` Connected to an existing tunnel process running on this machine. You can press: - Ctrl+C to detach - "x" to stop the tunnel and exit - "r" to restart the tunnel ``` These are then sent to the server to have that take effect. This is mostly some refactors in the singleton_server to make the lifecycle work.
This commit is contained in:
@@ -35,6 +35,13 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl<T: Clone + Send + Sync> Receivable<T> for Barrier<T> {
|
||||
async fn recv_msg(&mut self) -> Option<T> {
|
||||
self.wait().await.ok()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct BarrierOpener<T: Clone>(Arc<watch::Sender<Option<T>>>);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user