This content has been marked as final.
Show 3 replies
-
1. Re: Thread usage in paging
clebert.suconic Sep 2, 2008 3:51 PM (in response to timfox)OK... I am changing it to use an executor. I will start with a single-threaded executor. We can change it later if we want more than one depage thread working at any time.
-
2. Re: Thread usage in paging
timfox Sep 2, 2008 6:34 PM (in response to timfox)Just use a cached thread pool initialised with a JBMThreadFactory - see other places in the code that do this already.
-
3. Re: Thread usage in paging
clebert.suconic Sep 4, 2008 11:09 AM (in response to timfox)I have one executor being created at PagingManagerFactoryNIO. That executor is shared with all the PagingStores (i.e. all the addresses):
Before change:public PagingManagerFactoryNIO(final String directory) { this.directory = directory; this.executor = Executors.newSingleThreadExecutor(); }
From what I've seen in other places all I would need to do is change how I initialize the executor? Or I am missing something here?
After change:public PagingManagerFactoryNIO(final String directory) { this.directory = directory; this.executor = Executors.newCachedThreadPool(new JBMThreadFactory("JBM-depaging-threads")); }