non blocking interface
MasseGuillaume opened this issue · comments
Guillaume Massé (马赛卫) commented
setSession
implies a blocking interface. It would be nice if it could accept a Future[T]
Adam Warski commented
In what sense is setSession
blocking? If you have a future value, you can use onSuccess
(a standard akka-http directive) to unwrap the value:
onSuccess(myFuture) { sessionContent =>
setSession(sesisonContent) {
// ...
}
}
You could also easily make your own future-accepting directive. Does that work for you?
Guillaume Massé (马赛卫) commented
Oh perfect I didn't know this one existed