# std.Io.Threaded: fix group closure leak · gitcafe/zig

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

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

Visibility: public

Requested revision: 2046e0f4be23028d18009a61a517d0712e2ca164

Requested commit: 2046e0f4be23028d18009a61a517d0712e2ca164

Commit: 2046e0f4be23028d18009a61a517d0712e2ca164

Tree: 48e0c21716723769f40bc0ead859a1171c771b62

Author: Matthew Lugg

Committer: Matthew Lugg

## Message

```
std.Io.Threaded: fix group closure leak

More tasks could be added to the group at any time before it completes,
so it's not valid to look at the `token` passed in here.

There's also a related bug in `Threaded`, which is that tasks spawned in
a group after it is canceled will not observe that cancelation, but that
is a more complex bug which needs some deeper design changes.

```

## Parents

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

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