Make windows::EventHandle Sync

See also https://github.com/wez/wzsh/issues/4.

This makes `WindowsTerminalWaker` Send and unblocks building streampager on Windows.
This commit is contained in:
Jun Wu authored and Wez Furlong committed 2020-01-05 19:59:19 -08:00
1 parent 6fdae9b226
commit 1c5538976d
1 file changed
+3
+3
View File
@@ -167,6 +167,9 @@ impl EventHandle {
}
}
// Handle created by `CreateEventW` is safe to be shared.
unsafe impl Sync for EventHandle {}
impl Write for OutputHandle {
fn write(&mut self, buf: &[u8]) -> IoResult<usize> {
if self.write_buffer.len() + buf.len() > self.write_buffer.capacity() {