ok, then there's one small problem. CriticalStuff(...
# coroutines
h
ok, then there's one small problem. CriticalStuff() cant return value that i use for fallback. I have to use external var
e
hackerham: I don't follow your problem. What exactly is the problem you are trying to solve?
h
Copy code
var marker = AnswerContainer<StuffReturns>();
try { criticalStuff(marker); } 
catch (e: CancellationException) { criticalFallback(marker); }
e
Yes. You can do it that way
h
Is there a default wrapper that I can use ?
like java.util.Optional but without null
CriticalStuff() returns something, so I pass it wrapper where it will put the thing
ok, that's not related to Jobs anymore, thank you 🙂