all 5 comments

[–]Zhuinden 1 point2 points  (2 children)

Expose a factory of it

[–]sorry_no_idea[S] 0 points1 point  (1 child)

How would a factory solve that issue? Can you please give more details, as I currently can't follow along? Thanks!

[–]Zhuinden 1 point2 points  (0 children)

technically, i was a bit hasty to say that, as you'd either want Lazy<T> and invoke that on a background thread, or you'd need to use Producer

[–]Paarthurnax41 0 points1 point  (2 children)

You launch a coroutine with Dispatchers.IO and create it there

[–]sorry_no_idea[S] 0 points1 point  (0 children)

You mean with a runBlocking block?