please include function webs_readTripleFileAsTriples. static L webs_readTripleFileAsTriples_parallel(File f) ctex { if (!f.exists()) ret ll(); Iterator it = linesFromFile(f); final new L names; while (it.hasNext()) { S s = trim(it.next()); if (empty(s)) break; names.add(intern(unquote(s))); } final new L> triples; int poolSize = numberOfCores(), queueSize = 10000; NotifyingBlockingThreadPoolExecutor e = new(poolSize, queueSize, 15, TimeUnit.SECONDS); print("Using " + poolSize + " cores."); try { int i = 0; for (fS s : iterable(it)) { ++i; final int _i = i; e.execute(r { pcall { TripleWeb t = webs_readTripleFileAsTriples_line(s, names); if (t != null) synchronized(triples) { triples.add(pair(t, _i)); } }}); } e.shutdown(); e.awaitTermination(1, TimeUnit.DAYS); } finally { e.shutdown(); } ret firstOfPairs(sortBySecondOfPairs_inPlace(triples)); }