What is the difference between “Future.successful(None)” and “Future(None)”

Future.apply(None) creates asynchronous computation and executes it. It means that extra lambda object is created and extra task is scheduled (however trivial task).

Future.successful(None) just produces already completed future. It is more efficient.

Leave a Comment