# std.Io.Threaded.netReceive: recvmsg first, then poll · gitcafe/zig

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

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

Visibility: public

Requested revision: a5d8dcc025cc17466627c48bd3645b466b7ba0a5

Requested commit: a5d8dcc025cc17466627c48bd3645b466b7ba0a5

Commit: a5d8dcc025cc17466627c48bd3645b466b7ba0a5

Tree: cfe83822ac94f6430884ff66359badac9870d637

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.Io.Threaded.netReceive: recvmsg first, then poll

Calling recvmsg first means no poll syscall needed when messages are
already in the operating system queue. Empirically, this happens when
repeating a DNS query that has been already been made recently. In such
case, poll() is never called!

```

## Parents

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

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