Implementation of with-pipes function. It can be used for capturing i/o of threads or subprocesses for example.
Does it look like idiomatic Scheme code?
Implementation of with-pipes function. It can be used for capturing i/o of threads or subprocesses for example. Does it look like idiomatic Scheme code? 2 comments
@abcdw ‘with-pipes’ won’t close pipes in cases of a non-local exit of ‘proc’. To protect against that, you can wrap the call to ‘proc’ in ‘with-exception-handler’ or similar. (It’s tempting to use ‘dynamic-wind’ but then that would prevent ‘proc’ or its callees from capturing a delimited continuation that spans the ‘with-pipes’ call.) |
It should be call-with-pipes to fit the naming convention.