Skip to content

API Reference parrot.memory.dream.lease

github-actions[bot] edited this page Dec 2, 2026 · 1 revision

parrot.memory.dream.lease

View source

SchedulerLease — exactly one dream scheduler per agent across processes (FEAT-889 M4).

A non-blocking exclusive flock on <brain_root>/dream.lock. The holder runs dream cycles; other processes stay on standby and retry. The kernel releases the lock when the holder exits, so no stale-lock heuristics are needed. Single-host and Linux-only by construction.

Class SchedulerLease

Non-blocking exclusive flock on a lock file. Single-host only.

Parameter Type Default Description
lock_path Path

Attributes:

Attribute Type Description
held bool True while this object holds the lock.

Method SchedulerLease.try_acquire

Take the lock if free. Idempotent for the holder. Never blocks.

try_acquire() -> bool

Returns: bool

Method SchedulerLease.release

Release the lock (idempotent). Closing the descriptor is what frees it.

release() -> None

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally