from typing import Any, Optional

SOFTWARE_INFO: Any
reserved_requests: Any
active_requests: Any
total_count: Any
revoked: Any

def maybe_shutdown() -> None: ...
def task_reserved(request: Any, add_request: Any = ..., add_reserved_request: Any = ...) -> None: ...
def task_accepted(request: Any, _all_total_count: Optional[Any] = ..., add_active_request: Any = ..., add_to_total_count: Any = ...) -> None: ...
def task_ready(request: Any, remove_request: Any = ..., discard_active_request: Any = ..., discard_reserved_request: Any = ...) -> None: ...
bench_every = C_BENCH_EVERY

class Persistent:
    storage: Any = ...
    protocol: Any = ...
    compress: Any = ...
    decompress: Any = ...
    state: Any = ...
    filename: Any = ...
    clock: Any = ...
    def __init__(self, state: Any, filename: Any, clock: Optional[Any] = ...) -> None: ...
    def open(self): ...
    def merge(self) -> None: ...
    def sync(self) -> None: ...
    def close(self) -> None: ...
    def save(self) -> None: ...
    def db(self): ...
