# plugin_mutation_lock

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/plugins/store/plugin_mutation_lock)

Serialize plugin mutations across threads and dcode processes.

The lock is reentrant within one thread so compound operations such as
marketplace removal can call the normal uninstall path while holding it.

## Signature

```python
plugin_mutation_lock(
    *,
    timeout: float = -1,
) -> Iterator[None]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `timeout` | `float` | No | Seconds to wait for another mutation, or `-1` indefinitely. (default: `-1`) |

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/plugins/store.py#L52)