The new std.process is ready for review

Steven Schveighoffer schveiguy at yahoo.com
Thu Mar 7 04:50:13 PST 2013


On Wed, 06 Mar 2013 16:57:39 -0500, Dmitry Olshansky  
<dmitry.olsh at gmail.com> wrote:

> 06-Mar-2013 21:00, Steven Schveighoffer пишет:
>> On Wed, 06 Mar 2013 11:45:54 -0500, Steven Schveighoffer
>> <schveiguy at yahoo.com> wrote:
>>
>>
>>> a while ago (2008 or 09 I believe?), I was using Tango's Process
>>> object to execute programs on a remote agent, and forwarding all the
>>> resulting data back over the network.  On Linux, I used select to read
>>> data as it arrived.  On Windows, I think I had to spawn off a separate
>>> thread to wait for data/child processes.
>>
>> More coming back to me now -- Windows pipes actually suck quite a bit.
>> You can't use the normal mechanisms to wait for data on them.
>>
>> I also needed to spawn threads so I could combine the event-driven wait
>> for socket data from the remote instance with the data from the pipes.
>> I seem to remember opening a socket to my own process in order to do  
>> this.
>
> There is async read/write on pipes.
> Though no wait on pipes does suck.

Hm... I noted in the docs that async read/write is not supported:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa365141(v=vs.85).aspx

"Asynchronous (overlapped) read and write operations are not supported by  
anonymous pipes. This means that you cannot use the ReadFileEx and  
WriteFileEx functions with anonymous pipes. In addition, the lpOverlapped  
parameter of ReadFile and WriteFile is ignored when these functions are  
used with anonymous pipes."

-Steve


More information about the Digitalmars-d mailing list