Warning: session_start(): open(/var/lib/php/sessions/sess_vhtl228r8ugffd54kviu2qv44u, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
static L webs_readTripleFile_parallel(File f) ctex {
print("Reading " + f2s(f) + " in " + nCore(numberOfCores()));
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(unquote(s));
}
final new L> webs;
int poolSize = numberOfCores(), queueSize = 1000;
NotifyingBlockingThreadPoolExecutor e = new(poolSize, queueSize, 15, TimeUnit.SECONDS);
try {
int i = 0;
for (fS s : iterable(it)) {
++i;
final int _i = i;
e.execute(r { pcall {
Web web = webs_readTripleFile_line(s, names);
if (web != null) synchronized(webs) {
webs.add(pair(web, _i));
}
}});
}
e.shutdown();
e.awaitTermination(1, TimeUnit.DAYS);
} finally {
e.shutdown();
}
ret firstOfPairs(sortBySecondOfPairs_inPlace(webs));
}