[Twisted-Python] pb over windows named pipes?
teratorn at twistedmatrix.com
Tue Jun 20 20:26:48 EDT 2006
On Wed, 21 Jun 2006 04:55:36 +1000, Micky Latowicki <ml.flex at gmail.com>
> Thank you glyph and Itamar.
> The idea to use named pipes occured to us very late in our dev. process,
> a point where we really have to do things quickly. We think that we
> adopt named pipes nonetheless because they should save us a lot of other
> Looking at WaitForMultipleObjects, it doesn't seem like named pipes fit.
> would have to use overlapping IO and events for that.
WaitForMultipleObjects can be used with named pipes, and yes, you will
create Event objects and use overlapping IO with it.
See, for example,
I don't really have any idea how easily this would fit in
> Since we use wxreactor, we probably can't use win32eventreactor as-is.
> What is most accessible to us, we think, it to create threads and block.
> that's what we're going to do, at least until we have time to do
> nicer. We will contribute it, if we think it's good. We probably won't
> it's much good, though. Sorry.
> Thanks again.
Yeah, Twisted doesn't have any real support for combining reactors (and
maybe it's not really feasible), but that's a topic for another thread :)
> On 20/06/06, Itamar Shtull-Trauring <itamar at itamarst.org> wrote:
>> On Tue, 2006-06-20 at 14:03 -0400, glyph at divmod.com wrote:
>> > >2. how hard would it be
>> > To do it properly? You can't select() on named pipes in Windows, so
>> > you'd have to work with IOCP, which I unfortunately understand only at
>> > a high level. Hopefully someone who has worked with iocpreactor can
>> > answer your questions (hint, hint).
>> That's not completely accurate. I'm faily certain you can use named
>> pipes with WaitForMultipleObjects, so you could probably implement this
>> relatively easily with the win32eventreactor.
>> If they support non-blocking operations it should be easy to implement
>> using t.i.abstract.FileDescriptor as a basis; if they don't you can
>> probably steal most of the code from the win32 process support.
Eric Mangold - Twisted/Win32 Maintainer
More information about the Twisted-Python