# fix incorrect Thread.getCurrentId test · gitcafe/zig

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

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

Visibility: public

Requested revision: fd65cdc55a21640cf67a4a1b6ff8b58ad8c390fd

Requested commit: fd65cdc55a21640cf67a4a1b6ff8b58ad8c390fd

Commit: fd65cdc55a21640cf67a4a1b6ff8b58ad8c390fd

Tree: a11207e17878cf28be03a1076bdfe14603407e7a

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
fix incorrect Thread.getCurrentId test

Documentation comments copied here:

On Linux, it is possible that the thread spawned with `spawnThread`
finishes executing entirely before the clone syscall completes. In this
case, `std.os.Thread.handle` will return 0 rather than the
no-longer-existing thread's pid.

```

## Parents

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

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