Animesh Sahu
01/15/2021, 4:10 AMsuspend operator fun invoke
in the companion), or probably just wrap the result into a Deferred<>
and call await() every time when needed?rnett
01/15/2021, 5:23 AMBen Woodworth
01/15/2021, 5:27 PMinvoke
, I prefer to make a top level function next to the class with the same name. The IDE seems to suggest this function, but won't suggest the invoke
operator function.gildor
01/20/2021, 8:05 AMjust wrap the result into aDoesn’t look as a good solution for me, it’s constructor after all, it creates all kind limitation when you need multiple instances, and just doesn’t work as constructor Same as Ben I usually use builder function with the same name as class (and make constructor private) or just builder function with custom nameand call await() every timeDeferred<>
gildor
01/20/2021, 8:07 AMAnimesh Sahu
01/20/2021, 8:10 AM