Thanks a lot for your feedback.
Regarding the pushback, basically, all it does is to "block" (put it on sleep, I guess would be the right lingo for this, meaning that the thread is not failed, nor returned) the Lwt thread until the value is being read from the other side; and in order to get that "effect", I've used another Lwt_io pipe, and sending the output_channel of the intermediate pipe to the reader, and waiting for the confirmation on the intermediate input_channel; not entirely sure if this is the right approach, but so far worked pretty decent for me;
"One problem with your approach is that the marshall call itself is blocking and returns a string instead of sending on the channel directly. " - sorry, but really don't know what the problem is here, as I know way too little about Marshal - honestly I've been using it only in order to be able to send over the channel things like another channel (i.e. I'm sending that
t * Lwt_io.output_channel, thing that wasn't possible if I wouldn't specify that marshal instead).
And yes, I'll try to add some .mli, although initially when I did that, something seemed very off, so I decided to keep it "simple" - but I'll try to do it.
Again, thanks for taking your time to give some input on this.