int numThreads = CPUSupport.getNumProcessors(); CPUSupport.setConcurrency(numThreads + 5); pool = new ThreadPool(numThreads);
try { new TCPCalcServer().startServer(3535); } catch (IOException ioe) { // Error processing omitted }
try { pool.addRequest(new CalcObject(data.getInputStream(), data.getOutputStream())); } catch (IOException ioe) { // Error processing omitted }