diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-09-08 00:35:48 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-08 00:35:48 +0300 |
| commit | 62431dbd033bf1be2fe87fbc526df28084214e49 (patch) | |
| tree | bc9a9038ee718e0373f6eb08ebd78240f2524ead /src/platform/windows.rs | |
| parent | a9f3ad5fd4fdbb9bf6b422532f516114ce23ed10 (diff) | |
fix: reduce idle ssh cpu without dropping final output (#3728)
* fix: stop polling idle ssh uploads on unix
* fix: preserve ssh output during idle bridge cancellation
* test: exercise active ssh upload cancellation
Diffstat (limited to 'src/platform/windows.rs')
| -rw-r--r-- | src/platform/windows.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/platform/windows.rs b/src/platform/windows.rs index 4deb1864..e58bacae 100644 --- a/src/platform/windows.rs +++ b/src/platform/windows.rs @@ -24,6 +24,25 @@ pub(crate) fn classify_child_exit(status: &portable_pty::ExitStatus) -> super::C } } +pub(crate) struct RemoteBridgeWake; + +impl RemoteBridgeWake { + pub(crate) fn new() -> std::io::Result<Self> { + Ok(Self) + } + + pub(crate) fn cancel(&self) -> std::io::Result<()> { + // The named-pipe reader checks its cancellation flag between peeks. + Ok(()) + } + + pub(crate) fn wait(&self, _stream: &crate::ipc::LocalStream) -> std::io::Result<()> { + // Synchronous named pipes still use peek-before-read polling on Windows. + std::thread::sleep(Duration::from_millis(1)); + Ok(()) + } +} + pub(crate) fn wait_client_stream_readable( _stream: &crate::ipc::LocalStream, ) -> std::io::Result<()> { |
