Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`internet`.`win32eventreactor``

module documentation
(source)

A win32event based implementation of the Twisted main loop.

This requires pywin32 (formerly win32all) or ActivePython to be installed.

To install the event loop (and you should do this before any connections, listeners or connectors are added):

        from twisted.internet import win32eventreactor
        win32eventreactor.install()

LIMITATIONS:

1. WaitForMultipleObjects and thus the event loop can only handle 64 objects.
2. Process running has some problems (see `twisted.internet.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 select 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.

Class | `Win32Reactor` | Reactor that uses Win32 event APIs.
Function | `install` | Undocumented
Class | `_ThreadedWin32EventsMixin` | This mixin implements `IReactorWin32Events` for another reactor by running a `Win32Reactor` in a separate thread and dispatching work to it.
Class | `_ThreadFDWrapper` | This wraps an event handler and translates notification in the helper `Win32Reactor` thread into a notification in the primary reactor thread.

def install(): (source)

Undocumented