Join Slack
Powered by
Is there a way to create a non-capturing lambda fo...
# kotlin-native
b
basher
03/18/2019, 7:52 PM
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?
basher
03/18/2019, 7:57 PM
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
kpgalligan
03/18/2019, 8:05 PM
Got an example of what you’d like to do?
b
basher
03/18/2019, 8:13 PM
Nvm. I'm realizing now why I can't do what I want to do. thanks
k
kpgalligan
03/18/2019, 8:28 PM
Well, glad I could help!
😀 1
s
svyatoslav.scherbina
03/19/2019, 6:15 AM
You can implement a worker API wrapper that takes frozen lambda. And any non-capturing lambda can be frozen without side effects.
👍 1
4
Views
Open in Slack
Previous
Next