Bug 22481 – Thread.sleep should be pure

Status
NEW
Severity
enhancement
Priority
P4
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2021-11-05T02:28:25Z
Last change time
2024-12-07T13:41:26Z
Assigned to
No Owner
Creator
Luís Ferreira
Moved to GitHub: dmd#17197 →

Comments

Comment #0 by contact — 2021-11-05T02:28:25Z
Conceptually, a sleep is not a side effect and can be implemented with unoptimized assembly code, e.g. running n noops instructions. Since we are using the kernel implementation for precision sleep and it provides a well documented behaviour we should trust it and fake pure it.
Comment #1 by robert.schadek — 2024-12-07T13:41:26Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17197 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB