# std: add option to use single-threaded event loop · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/486a774e5fa079c4caba334f311ee32b54272f1f)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 486a774e5fa079c4caba334f311ee32b54272f1f

Requested commit: 486a774e5fa079c4caba334f311ee32b54272f1f

Commit: 486a774e5fa079c4caba334f311ee32b54272f1f

Tree: 4ff352cd107590dd9b379167c20a44cb6b278746

Author: Isaac Freund

Committer: Andrew Kelley

## Message

```
std: add option to use single-threaded event loop

std.event.Loop does not yet work in single threaded builds. However,
using evented io on a single thread can be very convenient. This commit
allows settind @import("root").event_loop_mode to .single_threaded
in order to allow this without reimplementing the startup code in
start.zig

```

## Parents

- [4170f3f77f23bca52a2a9b24d1a249fae35c04ac](https://git.cafe/gitcafe/zig/commit/4170f3f77f23bca52a2a9b24d1a249fae35c04ac?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/486a774e5fa079c4caba334f311ee32b54272f1f?format=markdown)
