Is there a way to create a non-capturing lambda fo...
# kotlin-native
b
Is there a way to create a non-capturing lambda for use with a Worker that isn't just providing the lambda in-line at the Worker.execute callsite?
if possible, i'd also like to be able to specify this kind of lambda type. the way that Worker.execute does it is not exposed publicly
k
Got an example of what you’d like to do?
b
Nvm. I'm realizing now why I can't do what I want to do. thanks
k
Well, glad I could help!
😀 1
s
You can implement a worker API wrapper that takes frozen lambda. And any non-capturing lambda can be frozen without side effects.
👍 1