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`.`python`.`threadable``

module documentation
(source)

A module to provide some very basic threading primitives, such as synchronization.

Class | `DummyLock` | Hack to allow locks to be unpickled on an unthreaded system.
Function | `getThreadID` | Undocumented
Function | `init` | Initialize threading.
Function | `isInIOThread` | Are we in the thread responsible for I/O requests (the event loop)?
Function | `registerAsIOThread` | Mark the current thread as responsible for I/O requests.
Function | `synchronize` | Make all methods listed in each class' synchronized attribute synchronized.
Function | `unpickle_lock` | Undocumented
Variable | `ioThread` | Undocumented
Variable | `threaded` | Undocumented
Variable | `XLock` | Undocumented
Function | `_sync` | Undocumented
Function | `_synchPost` | Undocumented
Function | `_synchPre` | Undocumented
Variable | `_dummyID` | Undocumented
Variable | `_synchLockCreator` | Undocumented

def getThreadID(): (source)

Undocumented

def init(with_threads=1): (source)

Initialize threading.

Don't bother calling this. If it needs to happen, it will happen.

def isInIOThread(): (source)

Are we in the thread responsible for I/O requests (the event loop)?

def registerAsIOThread(): (source)

Mark the current thread as responsible for I/O requests.

def synchronize(*klasses): (source)

Make all methods listed in each class' synchronized attribute synchronized.

The synchronized attribute should be a list of strings, consisting of the names of methods that must be synchronized. If we are running in threaded mode these methods will be wrapped with a lock.

def unpickle_lock(): (source)

Undocumented

ioThread = (source)

Undocumented

threaded: `bool` = (source)

Undocumented

XLock = (source)

Undocumented

def _sync(klass, function): (source)

Undocumented

def _synchPost(self): (source)

Undocumented

def _synchPre(self): (source)

Undocumented

_dummyID = (source)

Undocumented

_synchLockCreator = (source)

Undocumented