I have a IJobFor that I want to schedule after another job has finished (the results of the first are required to know the number of iterations to schedule the second for).
I do not want it to block the main thread. My first thought was to pass the handle and a Action to a ticking component that just checks the IsCompeted bool of the handle. But that seems not great.
My second thought was to use async and await to wait until it is completed. I found this implementation on github. But it seems to still block the main thread.
https://gist.github.com/distantcam/64cf44d84441e5c45e197f7d90c6df3e
Any thoughts? Am I just doing something wrong? Thanks!