[Issue 14251] synchronized (mtx) doesn't check attributes (pure, const)
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Tue Mar 22 10:06:34 PDT 2016
    
    
  
https://issues.dlang.org/show_bug.cgi?id=14251
--- Comment #2 from Johan Engelen <jbc.engelen at gmail.com> ---
Synchronizing inside a const method is done in a deprecated method in
std.concurrency:
    // @@@DEPRECATED_2016-03@@@
    /++
        $(RED Deprecated. isClosed can't be used with a const MessageBox.
              It will be removed in March 2016).
      +/
        deprecated("isClosed can't be used with a const MessageBox")
        final @property bool isClosed() const
        {
            synchronized( m_lock )
            {
                return m_closed;
            }
        }
--
    
    
More information about the Digitalmars-d-bugs
mailing list