www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22481] New: Thread.sleep should be pure

https://issues.dlang.org/show_bug.cgi?id=22481

          Issue ID: 22481
           Summary: Thread.sleep should be pure
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: contact lsferreira.net

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.

--
Nov 04 2021