title: Wait until Platform.runLater is executed using Latch
body: <p>What I am trying to achieve is to halt the thread and wait until doSomeProcess() is called before proceeding. But for some strange reason, the whole process got stuck at await and it never get into the Runnable.run. </p>
  
  <p>Code snippet : </p>
  
  <pre><code>final CountDownLatch latch = new CountDownLatch(1); 
  Platform.runLater(new Runnable() {
     @Override public void run() { 
       System.out.println("Doing some process");
       doSomeProcess();
       latch.countDown();
     }
  });
  System.out.println("Await");
  latch.await();      
  System.out.println("Done");
  </code></pre>
  
  <p>Console output : </p>
  
  <pre><code>Await
  </code></pre>