bsilverstrim
2022-7-29 23:29:33

I was looking at the docs on process, and it looks like Racket has a nice facility for reading the process’s stdout and writing to the stdin…but there’s a caveat about the buffer becoming full and getting stuck if the process and the parent are expecting the other to read and empty the pipe. Is there an idiomatic method to launch a subprocess and send/receive data between the parent and process in a way that doesn’t block while waiting for one or the other to occur? Would there have to be a thread handling input and a thread handling output so the application doesn’t hang but can still process asynchronous communication?