- line(content, " " + clazz + ".computeForEach(graph, " + signature[1] + ", null, procedure);");
- line(content, " return;");
- line(content, " }");
- }
- line(content, " " + clazz + " entry = (" + clazz + ")cache.getOrCreate" + clazz + "(graph.processor, " + signature[1] + (genAsync ? ", isSync" : "") + ");");
- if(genAsync) {
- line(content, " if(entry == null) {");
- line(content, " graph.processor.schedule(new SessionTask(false) {");
- line(content, " @Override");
- line(content, " public void run(int thread) {");
- line(content, " try {");
- line(content, " assert(!isSync);");
- line(content, " runner" + clazz + "(graph, r, parent, listener, procedure, isSync);");
- line(content, " } catch (DatabaseException e) {");
- line(content, " Logger.defaultLogError(e);");
- line(content, " }");
- line(content, " }");
- line(content, " });");
- line(content, " return;");
+ line(content, " " + (genReturn ? "return " : "") + clazz + ".computeForEach(graph, " + signature[1] + ", null, procedure);");
+ if(!genReturn) line(content, " return;");