pool.invoke(new PatternMatcher(regex, input, matches, db, graphManager));
// Cleaning up after yourself is important
pool.shutdown();
try {
pool.awaitTermination(5, TimeUnit.SECONDS);
} catch (InterruptedException e) {
e.printStackTrace();
}
return matches;