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

Changeset 3886

Show
Ignore:
Timestamp:
08/18/08 14:39:49 (4 months ago)
Author:
keinfarbton
Message:

merged from trunk -r 3716:3830

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/experimental/D2.0/dsss.conf

    r3724 r3886  
    1111    $DSSS_BUILD -obj -explicit lib/common/tango/core/Exception.d -fintfc-file=tango/core/Exception.di ; \ 
    1212    $DSSS_BUILD -obj -explicit lib/common/tango/core/Memory.d -fintfc-file=tango/core/Memory.di ; \ 
    13     $DSSS_BUILD -obj -explicit lib/common/tango/core/Runtime.d -fintfc-file=tango/core/Runtime.di ; \ 
    14     $DSSS_BUILD -obj -explicit lib/common/tango/core/Thread.d -fintfc-file=tango/core/Thread.di ;  
     13    $DSSS_BUILD -obj -explicit lib/common/tango/core/Runtime.d -fintfc-file=tango/core/Runtime.di ;  
    1514} else version (DigitalMars) { 
    1615    prebuild = $DSSS_BUILD -obj -explicit lib/common/tango/core/BitManip.d -Hftango/core/BitManip.di ; \ 
     
    3332 
    3433[tango/sys] 
    35 exclude = tango/sys/linux/* tango/sys/darwin/* tango/sys/win32/* tango/sys/freebsd/* 
     34exclude = tango/sys/linux/* tango/sys/darwin/* tango/sys/freebsd/* 
    3635exclude += tango/sys/TimeConverter.d 
     36exclude += tango/sys/win32/Type.di 
     37exclude += tango/sys/win32/UserGdi.di 
     38exclude += tango/sys/win32/Process.di 
     39exclude += tango/sys/win32/Macros.di 
     40version(!Windows) { 
     41    exclude += tango/sys/win32/CodePage.d 
     42} 
    3743 
    3844version (linux) { 
     
    7076[tango/time] 
    7177 
    72 [tango/group] 
     78[+std] 
     79preinstall = install std/intrinsic.di $INCLUDE_PREFIX/std ; \ 
     80    install std/stdarg.di $INCLUDE_PREFIX/std ; \ 
     81    install std/c/stdarg.di $INCLUDE_PREFIX/std/c 
    7382 
    74 [+std] 
    75 preinstall = installdir std $INCLUDE_PREFIX/std 
  • branches/experimental/D2.0/example/dsss.conf

    r3724 r3886  
    3333[networking/sockethello.d] 
    3434[networking/socketserver.d] 
    35 [system/arguments.d] 
     35#[system/arguments.d] 
    3636[system/localtime.d] 
    3737[system/normpath.d] 
     
    4141[text/formatspec.d] 
    4242[text/localetime.d] 
    43 [text/properties.d] 
    4443[text/token.d] 
    4544[text/xmldom.d] 
  • branches/experimental/D2.0/example/linux.mak

    r2854 r3886  
    6363    text/formatspec     \ 
    6464    text/localetime     \ 
    65     text/properties     \ 
    6665    text/token 
    6766 
  • branches/experimental/D2.0/install/windows/switch.d

    r3724 r3886  
    2626    { 
    2727        if(useMessageBoxes) 
    28             MessageBoxA(null, cast(ubyte*) toStringz(msg), cast(ubyte*) "Tango Switch utility\0", 0); 
     28            MessageBoxA(null, toStringz(msg), "Tango Switch utility\0", 0); 
    2929        else 
    3030            printf("%s\n", toStringz(msg)); 
     
    9494        } 
    9595         
    96         MoveFileA(cast(ubyte*) toStringz(targetConf), cast(ubyte*) toStringz(tangoConf));   // backup the Tango Build config 
    97         MoveFileA(cast(ubyte*) toStringz(phobosConf), cast(ubyte*) toStringz(targetConf));  // put Phobos's Build config in place 
     96        MoveFileA(toStringz(targetConf), toStringz(tangoConf));   // backup the Tango Build config 
     97        MoveFileA(toStringz(phobosConf), toStringz(targetConf));  // put Phobos's Build config in place 
    9898         
    99         if (!CopyFileA(cast(ubyte*) toStringz(phobosLib), cast(ubyte*) toStringz(targetLib), false)) 
     99        if (!CopyFileA(toStringz(phobosLib), toStringz(targetLib), false)) 
    100100            showMessage("Error: Could not find " ~ phobosLib); 
    101101        else 
     
    111111        } 
    112112         
    113         MoveFileA(cast(ubyte*) toStringz(targetConf), cast(ubyte*) toStringz(phobosConf));  // backup the Phobos Build config 
    114         MoveFileA(cast(ubyte*) toStringz(tangoConf), cast(ubyte*) toStringz(targetConf));   // put Tango's Build config in place 
     113        MoveFileA(toStringz(targetConf), toStringz(phobosConf));  // backup the Phobos Build config 
     114        MoveFileA(toStringz(tangoConf), toStringz(targetConf));   // put Tango's Build config in place 
    115115         
    116         if (!CopyFileA(cast(ubyte*) toStringz(tangoLib), cast(ubyte*) toStringz(targetLib), false)) 
     116        if (!CopyFileA(toStringz(tangoLib), toStringz(targetLib), false)) 
    117117            showMessage("Error: Could not find " ~ tangoLib); 
    118118        else 
  • branches/experimental/D2.0/lib/common/tango/core/Thread.d

    r3725 r3886  
    494494            if( m_sz && pthread_attr_setstacksize( &attr, m_sz ) ) 
    495495                throw new ThreadException( "Error initializing thread stack size" ); 
     496            if( pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_JOINABLE ) ) 
     497                throw new ThreadException( "Error setting thread joinable" ); 
    496498        } 
    497499 
     
    534536     *  ThreadException if the operation fails. 
    535537     *  Any exception not handled by the joined thread. 
    536      */ 
    537     final void join( bool rethrow = true ) 
     538     * 
     539     * Returns: 
     540     *  Any exception not handled by this thread if rethrow = false, null 
     541     *  otherwise. 
     542     */ 
     543    final Object join( bool rethrow = true ) 
    538544    { 
    539545        version( Win32 ) 
     
    558564            /+volatile+/ m_addr = m_addr.init; 
    559565        } 
    560         if( rethrow && m_unhandled ) 
    561         { 
    562             throw m_unhandled; 
    563         } 
     566        if( m_unhandled ) 
     567        { 
     568            if( rethrow ) 
     569                throw m_unhandled; 
     570            return m_unhandled; 
     571        } 
     572        return null; 
    564573    } 
    565574 
     
    601610 
    602611    /** 
    603      * Gets the daemon status for this thread. 
     612     * Gets the daemon status for this thread.  While the runtime will wait for 
     613     * all normal threads to complete before tearing down the process, daemon 
     614     * threads are effectively ignored and thus will not prevent the process 
     615     * from terminating.  In effect, daemon threads will be terminated 
     616     * automatically by the OS when the process exits. 
    604617     * 
    605618     * Returns: 
     
    616629 
    617630    /** 
    618      * Sets the daemon status for this thread. 
     631     * Sets the daemon status for this thread.  While the runtime will wait for 
     632     * all normal threads to complete before tearing down the process, daemon 
     633     * threads are effectively ignored and thus will not prevent the process 
     634     * from terminating.  In effect, daemon threads will be terminated 
     635     * automatically by the OS when the process exits. 
    619636     * 
    620637     * Params: 
     
    21132130 
    21142131        t.start(); 
    2115         synchronized 
     2132        synchronized( this ) 
    21162133        { 
    21172134            m_all[t] = t; 
     
    21362153 
    21372154        t.start(); 
    2138         synchronized 
     2155        synchronized( this ) 
    21392156        { 
    21402157            m_all[t] = t; 
     
    21602177    body 
    21612178    { 
    2162         synchronized 
     2179        synchronized( this ) 
    21632180        { 
    21642181            m_all[t] = t; 
     
    21842201    body 
    21852202    { 
    2186         synchronized 
     2203        synchronized( this ) 
    21872204        { 
    21882205            m_all.remove( t ); 
     
    21962213    final int opApply( int delegate( Thread ) dg ) 
    21972214    { 
    2198         synchronized 
     2215        synchronized( this ) 
    21992216        { 
    22002217            int ret = 0; 
     
    22262243    final void joinAll( bool rethrow = true ) 
    22272244    { 
    2228         synchronized 
     2245        synchronized( this ) 
    22292246        { 
    22302247            // NOTE: This loop relies on the knowledge that m_all uses the 
     
    26052622     * Throws: 
    26062623     *  Any exception not handled by the joined thread. 
    2607      */ 
    2608     final void call( bool rethrow = true ) 
     2624     * 
     2625     * Returns: 
     2626     *  Any exception not handled by this fiber if rethrow = false, null 
     2627     *  otherwise. 
     2628     */ 
     2629    final Object call( bool rethrow = true ) 
    26092630    in 
    26102631    { 
     
    26412662            m_unhandled = null; 
    26422663            if( rethrow ) 
    2643             { 
    26442664                throw obj; 
    2645             } 
    2646         } 
     2665            return obj; 
     2666        } 
     2667        return null; 
    26472668    } 
    26482669 
  • branches/experimental/D2.0/lib/compiler/dmd/adi.d

    r3724 r3886  
    374374/*************************************** 
    375375 * Support for array equality test. 
     376 * Returns: 
     377 *      1       equal 
     378 *      0       not equal 
    376379 */ 
    377380 
    378381extern (C) int _adEq(Array a1, Array a2, TypeInfo ti) 
    379382{ 
    380     /+ 
    381      + TODO: Re-enable once the correct TypeInfo is passed: 
    382      +       http://d.puremagic.com/issues/show_bug.cgi?id=2161 
    383      + 
    384     debug(adi) printf("_adEq(a1.length = %d, a2.length = %d)\n", a1.length, a2.length); 
    385  
    386     if (a1.length != a2.length) 
    387         return 0; // not equal 
    388     if (a1.ptr == a2.ptr) 
    389         return 1; // equal 
    390  
    391     // We should really have a ti.isPOD() check for this 
    392     if (ti.tsize() != 1) 
    393         return ti.equals(&a1, &a2); 
    394     return memcmp(a1.ptr, a2.ptr, a1.length) == 0; 
    395     +/ 
    396383    debug(adi) printf("_adEq(a1.length = %d, a2.length = %d)\n", a1.length, a2.length); 
    397384    if (a1.length != a2.length) 
     
    413400} 
    414401 
     402extern (C) int _adEq2(Array a1, Array a2, TypeInfo ti) 
     403{ 
     404    debug(adi) printf("_adEq2(a1.length = %d, a2.length = %d)\n", a1.length, a2.length); 
     405    if (a1.length != a2.length) 
     406        return 0;               // not equal 
     407    if (!ti.equals(&a1, &a2)) 
     408        return 0; 
     409    return 1; 
     410} 
    415411unittest 
    416412{ 
     
    432428extern (C) int _adCmp(Array a1, Array a2, TypeInfo ti) 
    433429{ 
    434     /+ 
    435      + TODO: Re-enable once the correct TypeInfo is passed: 
    436      +       http://d.puremagic.com/issues/show_bug.cgi?id=2161 
    437      + 
    438     debug(adi) printf("adCmp()\n"); 
    439  
    440     if (a1.ptr == a2.ptr && 
    441         a1.length == a2.length) 
    442         return 0; 
    443  
    444     auto len = a1.length; 
    445     if (a2.length < len) 
    446         len = a2.length; 
    447  
    448     // We should really have a ti.isPOD() check for this 
    449     if (ti.tsize() != 1) 
    450         return ti.compare(&a1, &a2); 
    451     auto c = memcmp(a1.ptr, a2.ptr, len); 
    452     if (c) 
    453         return c; 
    454     if (a1.length == a2.length) 
    455         return 0; 
    456     return a1.length > a2.length ? 1 : -1; 
    457     +/ 
    458430    debug(adi) printf("adCmp()\n"); 
    459431    auto len = a1.length; 
     
    484456} 
    485457 
     458extern (C) int _adCmp2(Array a1, Array a2, TypeInfo ti) 
     459{ 
     460    debug(adi) printf("_adCmp2(a1.length = %d, a2.length = %d)\n", a1.length, a2.length); 
     461    return ti.compare(&a1, &a2); 
     462} 
    486463unittest 
    487464{ 
  • branches/experimental/D2.0/lib/compiler/dmd/posix.mak

    r3724 r3886  
    7070    arraycast.o \ 
    7171    arraycat.o \ 
     72    arraydouble.o \ 
     73    arrayfloat.o \ 
     74    arrayreal.o \ 
    7275    cast.o \ 
    7376    cmath2.o \ 
     
    9699OBJ_UTIL= \ 
    97100    util/console.o \ 
     101    util/cpuid.o \ 
    98102    util/ctype.o \ 
    99103    util/string.o \ 
  • branches/experimental/D2.0/lib/compiler/dmd/win32.mak

    r3724 r3886  
    6666    arraycast.obj \ 
    6767    arraycat.obj \ 
     68    arraydouble.obj \ 
     69    arrayfloat.obj \ 
     70    arrayreal.obj \ 
    6871    cast.obj \ 
    6972    complex.obj \ 
     
    8992OBJ_UTIL= \ 
    9093    util\console.obj \ 
     94    util\cpuid.obj \ 
    9195    util\ctype.obj \ 
    9296    util\string.obj \ 
  • branches/experimental/D2.0/lib/dmdinclude

    r3724 r3886  
    3838        fi 
    3939 
    40         if [ "$DMDVERSIONMIN" -gt "31" ] 
     40        if [ "$DMDVERSIONMIN" = "32" ] 
     41        then 
     42            echo ">> DMD 1.032 is not supported by Tango. You are most likely going" 
     43            echo " >> to experience problems." 
     44        fi 
     45 
     46        if [ "$DMDVERSIONMIN" -gt "33" ] 
    4147        then 
    4248            echo ">> This version has not been tested with Tango prior to this release," 
    43             echo " >> so if you experience any problems, try reverting to DMD 1.031
     49            echo " >> so if you experience any problems, try reverting to DMD 1.033
    4450            echo " >> or earlier." 
    4551        fi 
  • branches/experimental/D2.0/tango/core/Array.d

    r3724 r3886  
    16951695     * 
    16961696     * Returns: 
    1697      *  The number of unique elements in buf. 
    1698      */ 
    1699     size_t unique( Elem[] buf, Pred2E pred = Pred2E.init ); 
     1697     *  The number of distinct sub-sequences in buf. 
     1698     */ 
     1699    size_t distinct( Elem[] buf, Pred2E pred = Pred2E.init ); 
    17001700} 
    17011701else 
    17021702{ 
    1703     template unique_( Elem, Pred = IsEqual!(Elem) ) 
     1703    template distinct_( Elem, Pred = IsEqual!(Elem) ) 
    17041704    { 
    17051705        static assert( isCallableType!(Pred) ); 
     
    17381738 
    17391739 
    1740     template unique( Buf ) 
    1741     { 
    1742         size_t unique( Buf buf ) 
    1743         { 
    1744             return unique_!(ElemTypeOf!(Buf)).fn( buf ); 
    1745         } 
    1746     } 
    1747  
    1748  
    1749     template unique( Buf, Pred ) 
    1750     { 
    1751         size_t unique( Buf buf, Pred pred ) 
    1752         { 
    1753             return unique_!(ElemTypeOf!(Buf), Pred).fn( buf, pred ); 
     1740    template distinct( Buf ) 
     1741    { 
     1742        size_t distinct( Buf buf ) 
     1743        { 
     1744            return distinct_!(ElemTypeOf!(Buf)).fn( buf ); 
     1745        } 
     1746    } 
     1747 
     1748 
     1749    template distinct( Buf, Pred ) 
     1750    { 
     1751        size_t distinct( Buf buf, Pred pred ) 
     1752        { 
     1753            return distinct_!(ElemTypeOf!(Buf), Pred).fn( buf, pred ); 
    17541754        } 
    17551755    } 
     
    17621762        void test( char[] buf, Cutf8 pat ) 
    17631763        { 
    1764             assert( unique( buf ) == pat.length ); 
     1764            assert( distinct( buf ) == pat.length ); 
    17651765            foreach( pos, cur; pat ) 
    17661766            { 
  • branches/experimental/D2.0/tango/core/Traits.d

    r3724 r3886  
    118118} 
    119119 
    120 debug(UnitTest) { 
    121  
    122     unittest { 
    123  
    124         assert(isPointerType!(void*)); 
    125         assert(!isPointerType!(char[])); 
    126         assert(isPointerType!(char[]*)); 
    127         assert(!isPointerType!(char*[])); 
    128         assert(isPointerType!(real*)); 
    129         assert(!isPointerType!(uint)); 
    130          
     120debug( UnitTest ) 
     121
     122    unittest 
     123    { 
     124        assert( isPointerType!(void*) ); 
     125        assert( !isPointerType!(char[]) ); 
     126        assert( isPointerType!(char[]*) ); 
     127        assert( !isPointerType!(char*[]) ); 
     128        assert( isPointerType!(real*) ); 
     129        assert( !isPointerType!(uint) ); 
     130 
    131131        class Ham 
    132132        { 
    133133            void* a; 
    134134        } 
    135          
    136         assert(!isPointerType!(Ham)); 
    137          
     135 
     136        assert( !isPointerType!(Ham) ); 
     137 
    138138        union Eggs 
    139139        { 
    140140            void* a; 
    141             uint b; 
     141            uint b; 
    142142        }; 
    143          
    144         assert(!isPointerType!(Eggs)); 
    145         assert(isPointerType!(Eggs*)); 
    146          
     143 
     144        assert( !isPointerType!(Eggs) ); 
     145        assert( isPointerType!(Eggs*) ); 
     146 
    147147        struct Bacon {}; 
    148          
    149         assert(!isPointerType!(Bacon)); 
     148 
     149        assert( !isPointerType!(Bacon) ); 
    150150 
    151151    } 
     
    173173} 
    174174 
    175  
    176 private template isStaticArrayTypeInst( T ) 
    177 { 
    178     const T isStaticArrayTypeInst = void; 
    179 } 
    180  
    181  
    182175/** 
    183176 * Evaluates to true if T is a static array type. 
    184177 */ 
    185 template isStaticArrayType( T ) 
    186 
    187     static if( is( typeof(T.length) ) && !is( typeof(T) == typeof(T.init) ) ) 
    188     { 
    189         const bool isStaticArrayType = is( T == typeof(T[0])[isStaticArrayTypeInst!(T).length] ); 
    190     } 
    191     else 
     178version( GNU ) 
     179
     180    // GDC should also be able to use the other version, but it probably 
     181    // relies on a frontend fix in one of the latest DMD versions - will 
     182    // remove this when GDC is ready. For now, this code pass the unittests. 
     183    private template isStaticArrayTypeInst( T ) 
     184    { 
     185        const T isStaticArrayTypeInst = void; 
     186    } 
     187 
     188    template isStaticArrayType( T ) 
     189    { 
     190        static if( is( typeof(T.length) ) && !is( typeof(T) == typeof(T.init) ) ) 
     191        { 
     192            const bool isStaticArrayType = is( T == typeof(T[0])[isStaticArrayTypeInst!(T).length] ); 
     193        } 
     194        else 
     195        { 
     196            const bool isStaticArrayType = false; 
     197        } 
     198    } 
     199
     200else 
     201
     202    template isStaticArrayType( T : T[U], size_t U ) 
     203    { 
     204        const bool isStaticArrayType = true; 
     205    } 
     206 
     207    template isStaticArrayType( T ) 
    192208    { 
    193209        const bool isStaticArrayType = false; 
     
    195211} 
    196212 
     213debug( UnitTest ) 
     214{ 
     215    unittest 
     216    { 
     217        assert( isStaticArrayType!(char[5][2]) ); 
     218        assert( !isDynamicArrayType!(char[5][2]) ); 
     219 
     220        assert( isStaticArrayType!(char[15]) ); 
     221        assert( !isStaticArrayType!(char[]) ); 
     222 
     223        assert( isDynamicArrayType!(char[]) ); 
     224        assert( !isDynamicArrayType!(char[15]) ); 
     225    } 
     226} 
    197227 
    198228/** 
  • branches/experimental/D2.0/tango/core/Vararg.d

    r1918 r3886  
    2424 
    2525 
    26     template va_start( T ) 
     26    /** 
     27     * This function initializes the supplied argument pointer for subsequent 
     28     * use by va_arg and va_end. 
     29     * 
     30     * Params: 
     31     *  ap      = The argument pointer to initialize. 
     32     *  paramn  = The identifier of the rightmost parameter in the function 
     33     *            parameter list. 
     34     */ 
     35    void va_start(T) ( out va_list ap, inout T parmn ) 
    2736    { 
    28         /** 
    29          * This function initializes the supplied argument pointer for subsequent 
    30          * use by va_arg and va_end. 
    31          * 
    32          * Params: 
    33          *  ap      = The argument pointer to initialize. 
    34          *  paramn  = The identifier of the rightmost parameter in the function 
    35          *            parameter list. 
    36          */ 
    37         void va_start( out va_list ap, inout T parmn ) 
    38         { 
    39             ap = cast(va_list) ( cast(void*) &parmn + ( ( T.sizeof + int.sizeof - 1 ) & ~( int.sizeof - 1 ) ) ); 
    40         } 
     37        ap = cast(va_list) ( cast(void*) &parmn + ( ( T.sizeof + int.sizeof - 1 ) & ~( int.sizeof - 1 ) ) ); 
    4138    } 
    4239 
    43  
    44     template va_arg( T ) 
     40    /** 
     41     * This function returns the next argument in the sequence referenced by 
     42     * the supplied argument pointer.  The argument pointer will be adjusted 
     43     * to point to the next arggument in the sequence. 
     44     * 
     45     * Params: 
     46     *  ap  = The argument pointer. 
     47     * 
     48     * Returns: 
     49     *  The next argument in the sequence.  The result is undefined if ap 
     50     *  does not point to a valid argument. 
     51     */ 
     52    T va_arg(T) ( inout va_list ap ) 
    4553    { 
    46         /** 
    47          * This function returns the next argument in the sequence referenced by 
    48          * the supplied argument pointer.  The argument pointer will be adjusted 
    49          * to point to the next arggument in the sequence. 
    50          * 
    51          * Params: 
    52          *  ap  = The argument pointer. 
    53          * 
    54          * Returns: 
    55          *  The next argument in the sequence.  The result is undefined if ap 
    56          *  does not point to a valid argument. 
    57          */ 
    58         T va_arg( inout va_list ap ) 
    59         { 
    60             T arg = *cast(T*) ap; 
    61             ap = cast(va_list) ( cast(void*) ap + ( ( T.sizeof + int.sizeof - 1 ) & ~( int.sizeof - 1 ) ) ); 
    62             return arg; 
    63         } 
     54        T arg = *cast(T*) ap; 
     55        ap = cast(va_list) ( cast(void*) ap + ( ( T.sizeof + int.sizeof - 1 ) & ~( int.sizeof - 1 ) ) ); 
     56        return arg; 
    6457    } 
    65  
    6658 
    6759    /** 
  • branches/experimental/D2.0/tango/core/Variant.d

    r3724 r3886  
    9595    } 
    9696 
     97    template isInterface(T) 
     98    { 
     99        static if( is( T == interface ) ) 
     100            const isInterface = true; 
     101        else 
     102            const isInterface = false; 
     103    } 
     104 
    97105    template isStaticArray(T) 
    98106    { 
     
    292300                this.value.obj = value; 
    293301            } 
     302            else static if( isInterface!(T) ) 
     303            { 
     304                this.value.obj = cast(Object) value; 
     305            } 
    294306            else 
    295307            { 
     
    379391                // Let D do runtime check itself 
    380392                && !isObject!(T) 
     393                && !isInterface!(T) 
    381394                // Allow implicit upcasts 
    382395                && !canImplicitCastTo!(T)(type) 
     
    426439        } 
    427440        else static if( isObject!(T) ) 
     441        { 
     442            return cast(T)this.value.obj; 
     443        } 
     444        else static if( isInterface!(T) ) 
    428445        { 
    429446            return cast(T)this.value.obj; 
     
    629646        } 
    630647 
     648        // Test interface support 
     649        { 
     650            interface A {} 
     651            interface B : A {} 
     652            class C : B {} 
     653            class D : C {} 
     654 
     655            A a = new D; 
     656            Variant v = a; 
     657            B b = v.get!(B); 
     658            C c = v.get!(C); 
     659            D d = v.get!(D); 
     660        } 
     661 
    631662        // Test doubles and implicit casting 
    632663        v = 3.1413; 
     
    719750    } 
    720751} 
    721  
  • branches/experimental/D2.0/tango/core/sync/ReadWriteMutex.d

    r2810 r3886  
    414414                        maxReaders = numReaders; 
    415415                } 
    416                 Thread.yield(); 
     416                Thread.sleep( 0.001 ); 
    417417                synchronized( synInfo ) 
    418418                { 
     
    455455                            maxReaders = numReaders; 
    456456                    } 
    457                     Thread.yield(); 
     457                    Thread.sleep( 0.001 ); 
    458458                    synchronized( synInfo ) 
    459459                    { 
     
    475475                            maxWriters = numWriters; 
    476476                    } 
    477                     Thread.yield(); 
     477                    Thread.sleep( 0.001 ); 
    478478                    synchronized( synInfo ) 
    479479                    { 
  • branches/experimental/D2.0/tango/core/sync/Semaphore.d

    r3724 r3886  
    326326            } 
    327327 
    328             for( int i = numConsumers * 10; i > 0; --i ) 
     328            for( int i = numConsumers * 1000; i > 0; --i ) 
    329329            { 
    330330                synchronized( synComplete ) 
     
    333333                        break; 
    334334                } 
     335                Thread.yield(); 
    335336            } 
    336337 
     
    339340                assert( numComplete == numConsumers ); 
    340341            } 
    341             assert( numConsumed == numToProduce ); 
     342 
     343            synchronized( synConsumed ) 
     344            { 
     345                assert( numConsumed == numToProduce ); 
     346            } 
    342347 
    343348            assert( !semaphore.tryWait() ); 
  • branches/experimental/D2.0/tango/io/FilePath.d

    r3727 r3886  
    13571357                assert (fp.isChild); 
    13581358 
    1359                 fp = new FilePath(r"C:\foo\bar\test.bar"); 
     1359                fp = new FilePath(r"C:/foo/bar/test.bar"); 
    13601360                assert (fp.path == "C:/foo/bar/"); 
    13611361                fp = new FilePath(r"C:/foo/bar/test.bar"); 
  • branches/experimental/D2.0/tango/io/FileSystem.d

    r3724 r3886  
    170170                                   { 
    171171                                   dir[len-1] = '/';                                    
    172                                    path = dir
     172                                   path = standard (dir)
    173173                                   } 
    174174                                else