Re: Deadlock in callbacks to async operations (Java)

2016-11-12 Thread Andrew Tolbert
> > Will the above example work if instead of session.execute, it was doing > session.executeAsync()? > It will work as executeAsync will not block waiting on behavior in a I/O thread (that may also happen to be the calling thread), so it is not susceptible to deadlock. To be extra safe, you coul

Deadlock in callbacks to async operations (Java)

2016-11-12 Thread Ali Akhtar
At https://datastax.github.io/java-driver/manual/async/ the docs say to not do any blocking operations within the callback of an async operation. This example is given as one that can cause a deadlock: ListenableFuture resultSet = Futures.transform(session, new Function() { public Resu