about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-unwind.diff
diff options
context:
space:
mode:
authorLaurence Tratt <laurie@tratt.net>2021-04-11 09:35:00 +0100
committerLaurence Tratt <laurie@tratt.net>2021-04-11 09:35:00 +0100
commit8d8f6995ce063fe812bb668a8b8fe4e5edf213ef (patch)
treeccdedf6e37f0710ac746b2716f8c71814f9541c3 /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-unwind.diff
parent28b948fc5c0163b76c69d792b91a0e83850e7e54 (diff)
downloadrust-8d8f6995ce063fe812bb668a8b8fe4e5edf213ef.tar.gz
rust-8d8f6995ce063fe812bb668a8b8fe4e5edf213ef.zip
Clarify the guarantees that ThreadId does and doesn't make.
The existing documentation does not spell out whether `ThreadId`s are unique
during the lifetime of a thread or of a process. I had to examine the source
code to realise (pleasingly!) that they're unique for the lifetime of a process.
That seems worth documenting clearly, as it's a strong guarantee.

Examining the way `ThreadId`s are created also made me realise that the `as_u64`
method on `ThreadId` could be a trap for the unwary on those platforms where the
platform's notion of a thread identifier is also a 64 bit integer (particularly
if they happen to use a similar identifier scheme to `ThreadId`). I therefore
think it's worth being even clearer that there's no relationship between the
two.
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-unwind.diff')
0 files changed, 0 insertions, 0 deletions