In my use case, I do not control the main fun. The...
# arrow
j
In my use case, I do not control the main fun. The endpoint is an HttpTrigger in an Azure Function App.
s
In that case, when the
HttpTrigger
function requires main to be blocking just use
unsafeRunSync
.
If there are any concerns of blocking a
main
thread than just like the Scala snippet first fork it into another context or run it inside a fiber.
j
I think for now, blocking the main thread is fine (because that is also what I would do in an OOP implementation). When we encounter any issues with this approach, I’ll look into forking it into another context. Thanks for sharing your insights.
s
👍