ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: How to pipe output to input?
Date Thu, 23 Jun 2005 16:20:43 GMT
Matt Benson wrote:
> --- Steve Loughran <> wrote:

>>Interesting design. I would have done a <namedpipe
>>id="" /> datatype 
>>that did the synchronisation; producers and
>>consumers would sync by 
>>choice of pipename.
> That could work, for isolation.  How would you specify
> the roles of producer/consumer?  Not that it matters
> too much, because:

It depends on the role. If you ask a named pipe for an input stream, you 
get an input stream, become a reader and block until there is a writer. 
If you ask one for an output stream, you get an output stream and block 
once the buffer is full. If >1 thing wants to be a reader or writer, 
signal a fault. (in unix you can have multiple readers or writers, but I 
dont want to complicate close() semantics with new reference counted 

>>But like you say, the problem
>>becomes process 
>>co-ordination; handling failures and propagating
>>them gracefully, or 
>>just how to keep processes around until their
>>consumer/producer was 
>>there. This is the stuff we normally delegate to the
>>OS, or, for 
>>distrubution, to some message queue. Though named
>>pipes work across 
>>clusters, at least on the apollo and hpux cluster
> This grows beyond my level of understanding.  :)

ahh, go and build it, you will soon learn. I've used unix named pipes in 
the past, and think they are a very cool form of IPC; like a socket but 
with better decoupling of produce/consume.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message