phantom-dsl

How risky is it to call Await.result on db calls

独自空忆成欢 提交于 2019-12-02 01:24:37
When using phantom how dangerous is it to be following this pattern in db calls: Await.result(dbOperationFut, 30.seconds) This isn't really phantom specific but it is the scala driver being used. I am weary of this pattern because of the potential GC pause that might last for over x seconds. How many seconds is safe given GC pauses? I am personally in favor of using for-comp and not blocking like this, but just want to know if this is a REALLY bad practice or it is fine. Context : This would be for akka based applications (akka, akka http) Thoughts? Becareful with Await.result Note this