In the Play Documentation Chunks are introduced as a solution to "streaming content". I am unsure whether streaming content can be produced slowly without blocking the HTTP thread or if I must separately make the convert the Chunks to an AsyncResult by changing (sc
is declared as Chunks
):
return ok(sc);
to:
return async(play.libs.Akka.future(new Callable<Result>() {
@Override
public Result call() throws Exception {
return ok(sc);
}
}));
When using the second solution, the chunks aren't appearing incrementally in the browser, and I wanted them to do that. Thanks in advance.