Skip to content

Locks

Classes

Locks


name

.name: str = ''

Name to represent the group.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


lock_file

1
2
3
4
5
.lock_file(
    fpath: Strpath,  # (1)!
    after_setup: bool = False,  # (2)!
    wait: bool = False,  # (3)!
)
  1. File path.

  2. True - after logging/daemon setup False - before starting

  3. True - wait if locked False - exit if locked

Locks the specified file.


set_basic_params

1
2
3
4
5
.set_basic_params(
    count: int | None = None,  # (1)!
    thunder_lock: bool | None = None,  # (2)!
    lock_engine: str | None = None,  # (3)!
)
  1. Create the specified number of shared locks.

  2. Serialize accept() usage (if possible) Could improve performance on Linux with robust pthread mutexes.

    http://uwsgi.readthedocs.io/en/latest/articles/SerializingAccept.html

  3. Set the lock engine.

    1
    2
    Example:
        - ipcsem
    

set_ipcsem_params

1
2
3
4
.set_ipcsem_params(
    ftok: str | None = None,  # (1)!
    persistent: bool | None = None,  # (2)!
)
  1. Set the ipcsem key via ftok() for avoiding duplicates.

  2. Do not remove ipcsem's on shutdown.

Sets ipcsem lock engine params.