()
| 288 | Runnable c = queue.poll(); |
| 289 | try { |
| 290 | c.run(); |
| 291 | } catch (Exception e) { |
| 292 | System.err.println(" exception thrown in main thread update "); |
| 293 | e.printStackTrace(); |
| 294 | } |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | |
| 299 | public <T> Future<T> queue(Callable<T> c) { |
| 300 | if (RunLoop.main.isMainThread()) { |
| 301 | CompletableFuture<T> f = new CompletableFuture<>(); |
| 302 | try { |
| 303 | T t = c.call(); |