Show
Ignore:
Timestamp:
12/07/07 00:01:26 (13 months ago)
Author:
cho45
Message:

lang/javascript/jsdeferred/trunk/test-rhino.js:

無駄に spawn しないようにした

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/jsdeferred/trunk/test-rhino.js

    r2678 r2679  
    125125                } 
    126126        }); 
    127         runQueue.add    = sync(function (func, delay) { 
     127        runQueue.add    = function (func, delay) { 
    128128                this.push({id:++runQueue._id,func:func, time: new Date().valueOf() + delay}); 
    129129                return runQueue._id; 
    130         }); 
    131         runQueue.remove = sync(function (id) { 
     130        }; 
     131        runQueue.remove = function (id) { 
    132132                for (var i = 0; i < this.length; i++) { 
    133133                        if (this[i].id == id) { 
     
    136136                        } 
    137137                } 
    138         }); 
     138        }; 
    139139        runQueue._id = 0; 
    140140 
     
    161161 
    162162        // run process 
    163         spawn(function () { 
    164                 while (runQueue.length) { 
    165 //                      print(uneval(runQueue)); 
    166                         runQueue.process(); 
    167                 } 
    168                 Global.addFinalizer.finalizers.forEach(function (i) { i() }); 
    169         }); 
     163        while (runQueue.length) { 
     164                runQueue.process(); 
     165        } 
     166        Global.addFinalizer.finalizers.forEach(function (i) { i() }); 
    170167})();