Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3800

Show
Ignore:
Timestamp:
07/25/08 15:30:46 (4 months ago)
Author:
sean
Message:

Whoever came up with the rule that "synchronized" without a "(this)" inside a class member function would synchronize on the global monitor instead of the instance monitor was smoking crack. This is completely ridiculous. I've fixed the instances where we were using unlabeled "synchronized" inside of the ThreadGroup? object. This closes #1171

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/common/tango/core/Thread.d

    r3701 r3800  
    21132113 
    21142114        t.start(); 
    2115         synchronized 
     2115        synchronized( this ) 
    21162116        { 
    21172117            m_all[t] = t; 
     
    21362136 
    21372137        t.start(); 
    2138         synchronized 
     2138        synchronized( this ) 
    21392139        { 
    21402140            m_all[t] = t; 
     
    21602160    body 
    21612161    { 
    2162         synchronized 
     2162        synchronized( this ) 
    21632163        { 
    21642164            m_all[t] = t; 
     
    21842184    body 
    21852185    { 
    2186         synchronized 
     2186        synchronized( this ) 
    21872187        { 
    21882188            m_all.remove( t ); 
     
    21962196    final int opApply( int delegate( inout Thread ) dg ) 
    21972197    { 
    2198         synchronized 
     2198        synchronized( this ) 
    21992199        { 
    22002200            int ret = 0; 
     
    22262226    final void joinAll( bool rethrow = true ) 
    22272227    { 
    2228         synchronized 
     2228        synchronized( this ) 
    22292229        { 
    22302230            // NOTE: This loop relies on the knowledge that m_all uses the