[Win32utils-devel] Asynchronous Pipe::Server problems
Berger, Daniel
Daniel.Berger at qwest.com
Tue May 20 11:06:22 EDT 2008
Hi,
> -----Original Message-----
> From: win32utils-devel-bounces at rubyforge.org
> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of
> Park Heesob
> Sent: Tuesday, May 20, 2008 8:25 AM
> To: Development and ideas for win32utils projects
> Subject: Re: [Win32utils-devel] Asynchronous Pipe::Server problems
<snip>
> >
> > I can see why we don't do this now, but I wonder if we
> should do this in
> > a finalizer, along with a call to FlushFileBuffers(). All
> the example
> > code I see closes the handle. Perhaps I'm being overly
> paranoid about
> > handle leaks, though.
> >
> > I'm also thinking about adding a block form that would
> automatically
> > ensure a call to Pipe#close.
> >
> > What do you think?
> >
> The problem is due to the reconnect method.
> The solution is define disconnect as DisconnectNamedPipe
> ,close as before
> and modify
>
> def reconnect
> close
> mainloop
> end
>
> to
>
> def reconnect
> disconnect
> mainloop
> end
Just to clarify, we want this in pipe.rb then?
def disconnect
DisconnectNamedPipe(@pipe)
end
def close
CloseHandle(@pipe)
end
Thanks,
Dan
This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.
More information about the win32utils-devel
mailing list