# PregelRunner

> **Class** in `langgraph`

📖 [View in docs](https://reference.langchain.com/python/langgraph/pregel/_runner/PregelRunner)

Responsible for executing a set of Pregel tasks concurrently, committing
their writes, yielding control to caller when there is output to emit, and
interrupting other tasks if appropriate.

## Signature

```python
PregelRunner(
    self,
    *,
    submit: weakref.ref[Submit],
    put_writes: weakref.ref[Callable[[str, Sequence[tuple[str, Any]]], None]],
    use_astream: bool = False,
    node_finished: Callable[[str], None] | None = None,
)
```

## Constructors

```python
__init__(
    self,
    *,
    submit: weakref.ref[Submit],
    put_writes: weakref.ref[Callable[[str, Sequence[tuple[str, Any]]], None]],
    use_astream: bool = False,
    node_finished: Callable[[str], None] | None = None,
) -> None
```

| Name | Type |
|------|------|
| `submit` | `weakref.ref[Submit]` |
| `put_writes` | `weakref.ref[Callable[[str, Sequence[tuple[str, Any]]], None]]` |
| `use_astream` | `bool` |
| `node_finished` | `Callable[[str], None] \| None` |


## Properties

- `submit`
- `put_writes`
- `use_astream`
- `node_finished`

## Methods

- [`tick()`](https://reference.langchain.com/python/langgraph/pregel/_runner/PregelRunner/tick)
- [`atick()`](https://reference.langchain.com/python/langgraph/pregel/_runner/PregelRunner/atick)
- [`commit()`](https://reference.langchain.com/python/langgraph/pregel/_runner/PregelRunner/commit)

---

[View source on GitHub](https://github.com/langchain-ai/langgraph/blob/a529b9bede1f1b6ecada4f0cc0e5c4b83526e563/libs/langgraph/langgraph/pregel/_runner.py#L122)