File tree Expand file tree Collapse file tree
src/com/darkprograms/speech/synthesiser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,8 +136,8 @@ public InputStream getMP3Data(String synthText) throws IOException{
136136 * @throws IOException Throws exception if it cannot complete the request
137137 */
138138 public InputStream getMP3Data (List <String > synthText ) throws IOException {
139- //Uses an executor service pool for concurrency
140- ExecutorService pool = Executors .newFixedThreadPool (synthText . size () );
139+ //Uses an executor service pool for concurrency. Limit to 1000 threads max.
140+ ExecutorService pool = Executors .newFixedThreadPool (1000 );
141141 //Stores the Future (Data that will be returned in the future)
142142 Set <Future <InputStream >> set = new LinkedHashSet <Future <InputStream >>(synthText .size ());
143143 for (String part : synthText ){ //Iterates through the list
You can’t perform that action at this time.
0 commit comments