basically write yourself a proc that takes in a channel as parameter. It should execute the query and pushes the results of that query into the channel before exiting. Start executing that proc via createThread on anotherThread. Now do whatever in your main-thread and then later check on the channel in a blocking manner using `read` if it has the result now, fetch it and do your thing. This allows you to do some work in parallel to spawning the query on the other thread.