We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05a6074 commit 18db2faCopy full SHA for 18db2fa
1 file changed
src/com/darkprograms/speech/synthesiser/Synthesiser.java
@@ -139,7 +139,7 @@ public InputStream getMP3Data(List<String> synthText) throws IOException{
139
//Uses an executor service pool for concurrency
140
ExecutorService pool = Executors.newFixedThreadPool(synthText.size());
141
//Stores the Future (Data that will be returned in the future)
142
- Set<Future<InputStream>> set = new LinkedHashSet<Future<InputStream>>();
+ Set<Future<InputStream>> set = new LinkedHashSet<Future<InputStream>>(synthText.size());
143
for(String part: synthText){ //Iterates through the list
144
Callable<InputStream> callable = new MP3DataFetcher(part);//Creates Callable
145
Future<InputStream> future = pool.submit(callable);//Begins to run Callable
0 commit comments