Open Binlogo opened 1 month ago
Follow suggestion in https://github.com/matklad/xshell/pull/91#issuecomment-2228324022
At the same time, adding a timeout/deadline method, while preserving blocking API, would be great. I think it's OK to burn a thread just for that: When we spawn a timeout-enabled process, we also spawn a timeout thread which also gets a reference to the Child's handle That thread blocks in https://doc.rust-lang.org/stable/std/sync/mpsc/struct.Receiver.html#method.recv_timeout if timeout elapses, it kills the process, which unblocks the main thread. otherwise, it unblocks when the sender side of the channel is blocked (it's important that we don't leave hanging threads around)
At the same time, adding a timeout/deadline method, while preserving blocking API, would be great. I think it's OK to burn a thread just for that:
Add timeout relative methods: run_timeout / read_timeout / read_stderr_timeout / output_timeout.
run_timeout
read_timeout
read_stderr_timeout
output_timeout
Follow suggestion in https://github.com/matklad/xshell/pull/91#issuecomment-2228324022
Add timeout relative methods:
run_timeout
/read_timeout
/read_stderr_timeout
/output_timeout
.