# std.Io.Select: introduce cancelDiscard · gitcafe/zig

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

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

Visibility: public

Requested revision: 8c70fd0a57936cca236a000a17364cbbf7a09673

Requested commit: 8c70fd0a57936cca236a000a17364cbbf7a09673

Commit: 8c70fd0a57936cca236a000a17364cbbf7a09673

Tree: dd753fb0a0e0c1e0e39c863985ece4f4e6581afb

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.Io.Select: introduce cancelDiscard

and make the return value of `cancel` return queue items.

I don't think it's possible to make `cancel` not deadlock with an empty
queue buffer without introducing a new Group primitive.

This is the best I could come up with based on existing primitives.
Let's see if applications find these APIs palatable.

```

## Parents

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

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