Wiki
Show
Ignore:
Timestamp:
03/10/10 08:29:43 (2 years ago)
Author:
Chuck.Esterbrook
Message:

Reduce run times for thread examples for the benefit of testify.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cobra/trunk/HowTo/370-Threads/500-ThreadPool.cobra

    r2278 r2306  
    6969            _serviced[hc] += 1 
    7070 
    71         Thread.sleep(2000)  # block for 2 seconds 
     71        Thread.sleep(1000) 
    7272        Interlocked.increment(inout _count) 
    7373        # if all jobs were completed then set the completed event 
     
    9090            print 'The number of threads used has been successfully limited' 
    9191 
    92         limit = 300  # max work items to queue so that we can see distribution amongst the threads 
     92        limit = 150  # max work items to queue so that we can see distribution amongst the threads 
    9393        completedEvent = ManualResetEvent(false) 
    9494        worker = Worker(limit, completedEvent)