MCPcopy Create free account
hub / github.com/SWI-Prolog/packages-jpl / run

Method run

src/examples/java/test/Test.java:338–362  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

336 }
337
338 public void run() {
339 Query query = new Query("p", new Term[] { new Atom("a"), new Atom("a") });
340 for (int i = 0; i < 10; ++i) {
341 try {
342 query.hasSolution();
343 } catch (JPLException e) {
344 System.out.println("Threaded p(a, a) threw exception: " + e);
345 System.exit(1);
346 }
347 System.out.print(id_);
348 Thread.yield();
349 }
350 for (int i = 0; i < 10; ++i) {
351 try {
352 while (query.hasMoreSolutions()) {
353 Thread.yield();
354 query.nextSolution();
355 }
356 } catch (JPLException e) {
357 System.out.println("Threaded p(a, a) threw exception: " + e);
358 System.exit(1);
359 }
360 System.out.print(id_);
361 }
362 }
363 }
364}

Callers

nothing calls this directly

Calls 3

hasSolutionMethod · 0.95
hasMoreSolutionsMethod · 0.95
nextSolutionMethod · 0.95

Tested by

no test coverage detected