Make use of a JavaFX service to host the tasks in.