Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 1696

Show
Ignore:
Timestamp:
06/29/10 21:24:38 (14 years ago)
Author:
sean
Message:

Issue 4406 - Typo (bug) in std.concurrency

Fixed.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/phobos/std/concurrency.d

    r1686 r1696  
    589589         * 
    590590         * Params: 
    591591         *  ops = The operations to match.  Each may return a bool to indicate 
    592592         *        whether a message with a matching type is truly a match. 
    593593         *  
    594594         * Throws: 
    595595         *  LinkTerminated if a linked thread terminated, or OwnerTerminated 
    596596         * if the owner thread terminates and no existing messages match the 
    597597         * supplied ops. 
    598598         */ 
    599         final void get(T...)( T ops ) 
     599        final void get(T...)( T vals ) 
    600600        { 
    601601            static assert( T.length ); 
    602602 
    603603            static if( isImplicitlyConvertible!(T[0], long) ) 
    604604            { 
    605605                alias TypeTuple!(T[1 .. $]) Ops; 
     606                alias vals[1 .. $] ops; 
     607                assert( vals[0] >= 0 ); 
    606608                enum timedWait = true; 
    607                 assert( ops[0] >= 0 ); 
    608                 long period = ops[0]; 
    609                 ops = ops[1 .. $]; 
     609                long period = vals[0]; 
    610610            } 
    611611            else 
    612612            { 
    613613                alias TypeTuple!(T) Ops; 
     614                alias vals[0 .. $] ops; 
    614615                enum timedWait = false; 
    615616            } 
    616617             
    617618            bool onStandardMsg( Message msg ) 
    618619            { 
    619620                Variant data = msg.data; 
    620621 
    621622                foreach( i, t; Ops ) 
    622623                { 
    623624                    alias ParameterTypeTuple!(t) Args;