Fork me on GitHub

Seems like each time I use await-tx a thread is spawned? Is that correct? Nevermind, it must be blocking the calling thread which is causing something else to spawn new threads


If I listen for the ::xt/indexed-tx event, then receive a message for a certain transaction id, would that be the same as calling await-tx on that transaction id?


I'm pretty sure that's fine, yep :thumbsup:

🙏 1

I'm trying to make sure a transaction can be queried once a request completes without blocking the calling thread...


I don't understand how do you wait without blocking?


even if you have a listener, someone is presumably still blocked while waiting for the right event to fire


yea the request will be blocked, but I think the web server (Aleph) should handle that for me without creating a new thread. Where as if I block the calling thread, Aleph ends up spawning a thread for each request again, which I don't want


haven't used, but you could hook the tx listener and manifold deferreds to do what you want I think


yea that's what I'm thinking


x-posting > We will continue our exploration of XTDB and Datalog. We will follow a XTDB tutorial on Nextjournal and do the exercises together. With discussions along the way.

👀 1
xt 1
Steven Deobald18:10:36

In case you feel like xt is lacking exposure:

🙏 1