MCPcopy Create free account
hub / github.com/Kitware/VTK / run

Method run

Wrapping/Java/Testing/Java/vtk/test/ConcurrencyGC.java:28–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26 // Setup working runnable
27 Runnable workingJob = new Runnable() {
28 public void run() {
29 try {
30 vtkUnstructuredGrid grid = new vtkUnstructuredGrid();
31 grid.SetPoints(new vtkPoints());
32 vtkPoints p;
33 long timeout = System.currentTimeMillis() + 60000; // +1 minute
34 while (System.currentTimeMillis() < timeout) {
35 p = grid.GetPoints();
36 if (p == null) {
37 throw new RuntimeException("Invalid pointer null");
38 }
39 if (p.GetReferenceCount() != 2) {
40 throw new RuntimeException("Invalid reference count of " + p.GetReferenceCount());
41 }
42 }
43 } catch (Throwable e) {
44 e.printStackTrace();
45 vtkJavaTesting.Exit(vtkJavaTesting.FAILED);
46 }
47 }
48 };
49
50 // Start threads for concurrency (2xwork + 1xGC + 1xGCinEDT)

Callers

nothing calls this directly

Calls 3

ExitMethod · 0.80
SetPointsMethod · 0.45
GetPointsMethod · 0.45

Tested by

no test coverage detected