# Revert "std.Io.Threaded: spurious unparks are possible" · gitcafe/zig

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

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

Visibility: public

Requested revision: 7c08f77efa6052750118881b506f7b59918993e0

Requested commit: 7c08f77efa6052750118881b506f7b59918993e0

Commit: 7c08f77efa6052750118881b506f7b59918993e0

Tree: 709e8cd8f846c98d59d47b3712e942889d4aa280

Author: Matthew Lugg

Committer: Matthew Lugg

## Message

```
Revert "std.Io.Threaded: spurious unparks are possible"

It turns out that at least on Windows, spurious unparks are *not*
possible, and in fact triggering them breaks some RTL synchronization
primitives. For instance, if you have a pending unpark going into a
contended `RtlEnterCriticalSection` call, it will never unblock. In
other words, the Windows API worked exactly how I thought it did, and
it's only the NetBSD/Illumos one which is dumb. This is actually exactly
why Windows 8 introduced the parking API despite alertable sleeps being
a thing!

This commit doesn't yet deal with making NetBSD work, nor does it even
compile I imagine. The next commit will fix everything back up.

This reverts commit c518593e9793a2aed4e0173348aff2cbef58b717.

```

## Parents

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

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