From play documentation
Whether the action code returns a Result or a Promise, both kinds of returned object are handled internally in the same way. There is a single kind of Action, which is asynchronous, and not two kinds (a synchronous one and an asynchronous one). Returning a Promise is a technique for writing non-blocking code.
does this mean that there is no difference/advantage or disadvantage in returning a Promise<Result>
rather than returning a Result
? If play! framework encloses calls to public static Result function()
in a Promise
, is there a point in the developer explicitly returning a Promise<Result>
?