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

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

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

Visibility: public

Requested revision: 62d0dd0d36efc6501b8b1c37bf8c7052cfdc3ef2

Requested commit: 62d0dd0d36efc6501b8b1c37bf8c7052cfdc3ef2

Commit: 62d0dd0d36efc6501b8b1c37bf8c7052cfdc3ef2

Tree: 61e99074684afb03ecdd89a09ede466ca6e69de8

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

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

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