If i call this from another function the fireAndFo...
# coroutines
k
If i call this from another function the fireAndForgetSuspendFunction(arg) never runs. If i remove the delay it runs. How can i make it run in the background with the delay?
b
run it on a scope that won't be cancelled in next 5s
k
I’ve tried a couple of different things, ie running it in Globalscope, same result. The delay can possibly be from minutes to hours since it is lightweight scheduled jobs.
b
in this case actual delay may be longer (e.g. due CPU slowdown). Don't you run it on mac?
k
Yeah, developing on a Mac
btw, the fireAndForgetSuspendFunction(arg) has references to objects injected into the containing class and calls other suspension functions. Haven’t really found any good examples of something similar
…if i just println after the delay i see the output, ie println(“Called Me”)
@bezrukov Arrrrrrrghhh! You are right. I let i run for some minutes and it started showing me the expected results
Thanx for the hint! I’ve been debugging like crazy….and it’s been working all the time 😅
👍 1