What will be the best way to implement multiple DB queries or any sync operation on a new thread?
Lets take for example the following code:
(let [res1 (mysql/query...)
res2 (mysql/query...)
res3 (mysql/query...)
final (do-something res1 res2 res3)]
(http/ok final))
In this example res1
res2
res3
are not connected to each other.. meaning that you can execute all of them at the same time and then wait for all.
I would like that the 3 queries will go on the same time and then wait for all of them togehter.