# `Snakepit.Internal.TimeoutRunner`
[🔗](https://github.com/nshkrdotcom/snakepit/blob/v0.13.0/lib/snakepit/internal/timeout_runner.ex#L1)

Bounded-time function execution using `spawn_monitor` and `receive`.

Provides a single `run/2` function that executes a zero-arity function in a
monitored process with an explicit timeout. Used by the executor, Python
package runner, and shutdown modules as a replacement for `Task.async`/`yield`.

# `run`

```elixir
@spec run((-&gt; term()), non_neg_integer()) ::
  {:ok, term()} | :timeout | {:error, term()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
