Package twisted :: Package internet :: Module win32eventreactor |
[show private | hide private]
[frames | no frames]

## Module twisted.internet.win32eventreactor

A win32event based implementation of the Twisted main loop.

This requires win32all or ActivePython to be installed.

API Stability: semi-stable

Maintainer: Itamar Shtull-Trauring<mailto:twisted@itamarst.org>

LIMITATIONS:

1. WaitForMultipleObjects and thus the event loop can only handle 64 objects.
2. Process running has some problems (see Process docstring).

TODO:

1. Event loop handling of writes is *very* problematic (this is causing failed tests). Switch to doing it the correct way, whatever that means (see below).
2. Replace icky socket loopback waker with event based waker (use dummyEvent object)
3. Switch everyone to using Free Software so we don't have to deal with proprietary APIs.

ALTERNATIVE SOLUTIONS:

- IIRC, sockets can only be registered once. So we switch to a structure like the poll() reactor, thus allowing us to deal with write events in a decent fashion. This should allow us to pass tests, but we're still limited to 64 events.

Or:

- Instead of doing a reactor, we make this an addon to the default reactor. The WFMO event loop runs in a separate thread. This means no need to maintain separate code for networking, 64 event limit doesn't apply to sockets, we can run processes and other win32 stuff in default event loop. The only problem is that we're stuck with the icky socket based waker. Another benefit is that this could be extended to support >64 events in a simpler manner than the previous solution.

The 2nd solution is probably what will get implemented.

Classes
`Win32Reactor` | Reactor that uses Win32 event APIs.
`Process` | A process that integrates with the Twisted event loop.

Function Summary
| `install()`

Variable Summary
`FakeModule` | `CreateEvent`
`dict` | `events`
`FakeModule` | `FD_ACCEPT`
`FakeModule` | `FD_CLOSE`
`FakeModule` | `FD_CONNECT`
`FakeModule` | `FD_READ`
`FakeModule` | `FD_WRITE`
`FakeModule` | `INFINITE`
`MetaInterface` | `IReactorFDSet`
`FakeModule` | `MsgWaitForMultipleObjects`
`FakeModule` | `msvcrt`
`FakeModule` | `pywintypes`
`FakeModule` | `QS_ALLEVENTS`
`FakeModule` | `QS_ALLINPUT`
`dict` | `reads`
`FakeModule` | `WAIT_OBJECT_0`
`FakeModule` | `WAIT_TIMEOUT`
`FakeModule` | `win32api`
`FakeModule` | `win32con`
`FakeModule` | `win32event`
`FakeModule` | `win32file`
`FakeModule` | `win32gui`
`FakeModule` | `win32pipe`
`FakeModule` | `win32process`
`FakeModule` | `win32security`
`dict` | `writes`
`FakeModule` | `WSAEventSelect`

Variable Details

    ### CreateEvent Type: `FakeModule` Value:
        <Fake win32event.CreateEvent>

    ### events Type: `dict` Value:
        {}

    ### FD_ACCEPT Type: `FakeModule` Value:
        <Fake win32file.FD_ACCEPT>

    ### FD_CLOSE Type: `FakeModule` Value:
        <Fake win32file.FD_CLOSE>

    ### FD_CONNECT Type: `FakeModule` Value:
        <Fake win32file.FD_CONNECT>

    ### FD_READ Type: `FakeModule` Value:
        <Fake win32file.FD_READ>

    ### FD_WRITE Type: `FakeModule` Value:
        <Fake win32file.FD_WRITE>

    ### INFINITE Type: `FakeModule` Value:
        <Fake win32event.INFINITE>

    ### IReactorFDSet Type: `MetaInterface` Value:
        <class 'twisted.internet.interfaces.IReactorFDSet'>

    ### MsgWaitForMultipleObjects Type: `FakeModule` Value:
        <Fake win32event.MsgWaitForMultipleObjects>

    ### msvcrt Type: `FakeModule` Value:
        <Fake msvcrt>

    ### pywintypes Type: `FakeModule` Value:
        <Fake pywintypes>

    ### QS_ALLEVENTS Type: `FakeModule` Value:
        <Fake win32event.QS_ALLEVENTS>

    ### QS_ALLINPUT Type: `FakeModule` Value:
        <Fake win32event.QS_ALLINPUT>

    ### reads Type: `dict` Value:
        {}

    ### WAIT_OBJECT_0 Type: `FakeModule` Value:
        <Fake win32event.WAIT_OBJECT_0>

    ### WAIT_TIMEOUT Type: `FakeModule` Value:
        <Fake win32event.WAIT_TIMEOUT>

    ### win32api Type: `FakeModule` Value:
        <Fake win32api>

    ### win32con Type: `FakeModule` Value:
        <Fake win32con>

    ### win32event Type: `FakeModule` Value:
        <Fake win32event>

    ### win32file Type: `FakeModule` Value:
        <Fake win32file>

    ### win32gui Type: `FakeModule` Value:
        <Fake win32gui>

    ### win32pipe Type: `FakeModule` Value:
        <Fake win32pipe>

    ### win32process Type: `FakeModule` Value:
        <Fake win32process>

    ### win32security Type: `FakeModule` Value:
        <Fake win32security>

    ### writes Type: `dict` Value:
        {}

    ### WSAEventSelect Type: `FakeModule` Value:
        <Fake win32file.WSAEventSelect>

Generated by Epydoc 1.1 on Thu May 8 13:18:30 2003 | http://epydoc.sf.net