|
From: Bruce M. <br...@mc...> - 2003-07-16 05:29:26
|
Jonathan, All: I have refactored the PipelineStageFactory so that methods: processPipelineStageResults (non-threaded) processPipelineStageResultsParallel (threaded) are as similar as possible and all possible code overlaps are extracted to other methods. At the core, the difference between the two of them is the maxThreads argument. This argument indicates the number of threads to be spawned to handle the processing of the pipeline stage results. I contend that this is an attribute of the pipeline stage factory and should be managed by a threadpool. In fact, in direct contradiction to my prior email on this matter, an even simpler implementation would be to subclass the non-threaded implementation and override the processPipelineStageResults method to handle all the threaded complexity. thoughts? regards, Bruce. PS. My thanks to Jonathan for stinging my lazy butt out of a destructive cycle of Rise Of Nations multiplayer games :) PPS. I would seriously advise everyone to look at this code - it looks solid. That ThreadLocal thing was new to me. |