Transact async API clarification request

My understanding is that d/transact blocks, even though it returns a future. So why does it return a future?

d/transact-async claims to “return its future” immediately, so you can wait/deref the future on another thread.

However, in this example (Datomic Best Practices | Datomic) the future returned by d/transact-async is immediately deref’ed on the same thread(s) given by pipeline-blocking. Why not use d/transact then? Where is the async API utilized here?

1 Like