示例#1
0
 private synchronized void shutdown() {
   if (!exe.isShutdown()) {
     freeCUObjectsMemory();
   }
   exe.shutdown();
   try {
     System.err.println(
         "cuda device " + Id + " freed ? " + exe.awaitTermination(10, TimeUnit.SECONDS));
   } catch (InterruptedException e) {
     e.printStackTrace();
   }
 }
示例#2
0
 public Future<?> submit(Runnable runnable) {
   if (!exe.isShutdown()) {
     return exe.submit(runnable);
   }
   return null;
 }