# `Mojentic.Events.TerminateEvent`
[🔗](https://github.com/svetzal/mojentic-ex/blob/v1.5.0/lib/mojentic/event.ex#L90)

Special event that signals the dispatcher to stop processing.

When a `TerminateEvent` is dispatched, the async dispatcher will gracefully
shut down after processing any remaining events in the queue.

## Examples

    terminate_event = %Mojentic.Events.TerminateEvent{
      source: MyAgent
    }

    AsyncDispatcher.dispatch(dispatcher, terminate_event)

# `t`

```elixir
@type t() :: %Mojentic.Events.TerminateEvent{
  correlation_id: String.t() | nil,
  source: module()
}
```

---

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