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`.`_threads`.`LockWorker``

class documentation

`class LockWorker: (source)`

Constructor: `LockWorker(lock, local)`

Implements interfaces: `twisted._threads._ithreads.IExclusiveWorker`

View In Hierarchy

An `IWorker` implemented based on a mutual-exclusion lock.

Method | `__init__` | No summary
Method | `do` | Do the given work on this thread, with the mutex acquired. If this is called re-entrantly, return and wait for the outer invocation to do the work.
Method | `quit` | Quit this `LockWorker`.
Instance Variable | `_local` | Undocumented
Instance Variable | `_lock` | Undocumented
Instance Variable | `_quit` | Undocumented

def __init__(self, lock, local): (source)

Parameters
lock:`threading.Lock` | A mutual-exclusion lock, with `acquire` and `release` methods.
local:`threading.local` | Local storage.

def do(self, work: `Callable[[], None]`): (source)
from `twisted._threads.IWorker`

Do the given work on this thread, with the mutex acquired. If this is called re-entrantly, return and wait for the outer invocation to do the work.

Parameters
work:`Callable[[], None]` | the work to do with the lock held.

def quit(self): (source)
from `twisted._threads.IWorker`

Quit this `LockWorker`.

_local = (source)

Undocumented

_lock = (source)

Undocumented

_quit = (source)

Undocumented