# std.Io.Threaded: remove handling of ECANCELED · gitcafe/zig

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

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

Visibility: public

Requested revision: 64de4a7371e3851dddf39c608d08d480395bb0ab

Requested commit: 64de4a7371e3851dddf39c608d08d480395bb0ab

Commit: 64de4a7371e3851dddf39c608d08d480395bb0ab

Tree: 2d323d592f66dbe273199190ccd7894500e03e90

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.Io.Threaded: remove handling of ECANCELED

The only known situation in which this occurs is when using musl with
the undocumented extension PTHREAD_CANCEL_MASKED, causing the next
syscall to return ECANCELED.

However zig std lib does not use this mechanism, even when targeting
musl libc because it would require each async task to be on a fresh
pthread.

For the same reason, if third party code were to cause ECANCELED to be
returned from any of these syscalls, it would cause subsequent tasks to
be incorrectly canceled since they cannot be rearmed.

Thus, this Io implementation cannot handle this error code correctly,
expecting never to receive it.

```

## Parents

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

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