# std.Io.Threaded: optimize batchAwaitConcurrent for net_receive · gitcafe/zig

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

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

Visibility: public

Requested revision: ebb2752c07ec1538ac08e26e2a65a8492da14d47

Requested commit: ebb2752c07ec1538ac08e26e2a65a8492da14d47

Commit: ebb2752c07ec1538ac08e26e2a65a8492da14d47

Tree: f8fb1cd68d0c24792e442698ca7ab3d7990eb356

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.Io.Threaded: optimize batchAwaitConcurrent for net_receive

Eagerly receive messages with MSG_DONTWAIT before polling. This makes
the DNS resolution use case end up doing:

recvmsg (EAGAIN)
poll
recvmsg (success)
recvmsg (success)

rather than:

poll
recvmsg (success)
poll
recvmsg (success)

```

## Parents

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

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