Named pipes in 3.4

Hey All,

Is it possible to add a time-out to a named pipe read to avoid excessive blocking when the consumer is faster than the producer and there’s no data available on the pipe?

Thanks,

N.

if you’re using a q client, there shouldn’t be any blocking as q uses select to check for inputs… i think?

Only tested with Mac, but I’m finding it  blocks until you push something on to the empty pipe.

Hi,
the read1 or read0 does NOT block. It just returns empty data.

The hopen acrually blocks. timeout does not work for it..

Markus

this page states that readx does block.

http://code.kx.com/wiki/Cookbook/NamedPipes

i was thinking that you could use .z.ps to handle data as it arrives, but these functions are designed for IPC, not just any file/pipe.