Esempio n. 1
0
 private ReadaheadPool()
 {
     pool = new ThreadPoolExecutor(PoolSize, MaxPoolSize, 3L, TimeUnit.Seconds, new ArrayBlockingQueue
                                   <Runnable>(Capacity));
     pool.SetRejectedExecutionHandler(new ThreadPoolExecutor.DiscardOldestPolicy());
     pool.SetThreadFactory(new ThreadFactoryBuilder().SetDaemon(true).SetNameFormat("Readahead Thread #%d"
                                                                                    ).Build());
 }